I have a very complicated formula:
=if(
and(A$1>$W4, A$1<=$X4, $X4>B$1),
$U4,
if(and($W4>=A$1,$W4<B$1),
days(B$1,$W4)*($U4/days(B$1,A$1))+0,
if(and($X4>A$1,$X4<=B$1),
days($X4,A$1)*($U4/days(B$1,A$1)),
0)))
And rather than type 'Other Sheet'!cell for every cell reference, I would like to know if there's a way I can describe the entire sheet prior to referencing cells from that sheet. I thought that perhaps this would work but it obviously doesn't. Any solutions?
=query('othersheet'!cell:cell,if(
and(A$1>$W4, A$1<=$X4, $X4>B$1),
$U4,
if(and($W4>=A$1,$W4<B$1),
days(B$1,$W4)*($U4/days(B$1,A$1))+0,
if(and($X4>A$1,$X4<=B$1),
days($X4,A$1)*($U4/days(B$1,A$1)),
0))))
unfortunately no, you still need to reference it
=IF(AND('othersheet'!A$1 > 'othersheet'!$W4,
'othersheet'!A$1 <= 'othersheet'!$X4,
'othersheet'!$X4 > 'othersheet'!B$1), 'othersheet'!$U4,
IF(AND('othersheet'!$W4 >= 'othersheet'!A$1,
'othersheet'!$W4 < 'othersheet'!B$1),
DAYS('othersheet'!B$1, 'othersheet'!$W4)*('othersheet'!$U4/
DAYS('othersheet'!B$1, 'othersheet'!A$1))+0,
IF(AND('othersheet'!$X4 > 'othersheet'!A$1,
'othersheet'!$X4 <= 'othersheet'!B$1),
DAYS('othersheet'!$X4, 'othersheet'!A$1)*('othersheet'!$U4/
DAYS('othersheet'!B$1, 'othersheet'!A$1)), 0)))
or you can put your formula into some auxiliary column in your othersheet (let's say X4) and then just reference
='othersheet'!X4
Related
How to make my ARRAYFORMULA(A1 + something else) to stop producing results after there are no more values in A1 column, eg. to skip blank values. By default it gives endlessly "something else".
Here is my demo sheet:
https://docs.google.com/spreadsheets/d/1AikL5xRMB94BKwG34Z_tEEiI07aUAmlbNzxGZF2VeYs/edit?usp=sharing
Actual data in column A1 is regularly changing, rows are being added.
I tried the others and they didn't work. This does though:
=ARRAYFORMULA(filter(A1:B;A1:A<>"";B1:B<>""))
use:
=ARRAYFORMULA(IF(A1:A="";;A1:A+1000))
You can try this formula =ARRAYFORMULA(IF(ISBLANK(A1:A),"",(A1:A + B1:B))) if this works out for you.
Reference:
https://support.google.com/docs/answer/3093290?hl=en
For years I have been using a very long formula to help me achieve what I am going to ask here.
Basically, every month I download my Credit Card statement and use a bunch of formulas to sum it up in a better way to import into my accounting software. What my formulas do is that it reads the Description in each row and based on the content of that row it rewrites that description.
For example: In my credit card it may say "Starbucks Main St.", so it looks for that information in a list and if it finds "Starbucks", it will rewrite (in the cell where the formula is located) to "Coffee".
So, what I have is:
Column B > Original Description from Credit Card Statement
Column F > Keyword to be found
Column G > New description
The problem is that I use an IF Search formula that has to be as long as the size of that list. It works, but I wonder if it can't be simplified. Another "issue" is that I can't use an arrayformula, so putting the formula on top of the spreadsheet and it would expand to the whole statement.
Here's an example:
https://docs.google.com/spreadsheets/d/14255Sz28ItSMZ32EebIFiAHQFxtyCJakN5q3gYUB-N0/edit#gid=0
ANY ideas?
try:
=ARRAYFORMULA(PROPER(IFNA(VLOOKUP(REGEXEXTRACT(PROPER(B2:B);
SORT(TEXTJOIN("|"; 1; PROPER(G2:G)); 1; 0)); G2:H; 2; 0); B2:B)))
I have in Google Sheets (or Excel) a cell with a content =2*34+3*39
I need to sum up all the numbers used before the multiplication, in this example it would be 5 (2+3).
Is there any formula in Google Sheets or Excel to do this work?
There are hundreds of different formulas, but I can't find any suitable.
This will take an assumption, that the formula only use + for each mulification:
=sum(query(arrayformula(split(transpose(split(REGEXREPLACE(FORMULATEXT(A38), "=", ""), "+")), "*")), "select Col1"))
And this with an assumption, that the formula use + and each has multification:
=sum(arrayformula(value(regexextract(transpose(split(REGEXREPLACE(FORMULATEXT(A38), "=", ""), "+")), "^(.*)[*]"))))
sure:
=LEN(REGEXREPLACE(FORMULATEXT(A1); "[^*]"; ))
=ARRAYFORMULA(SUM(1*IFERROR(REGEXEXTRACT(SPLIT(REGEXREPLACE(
FORMULATEXT(A1); "(\*)"; "$1♥"); "♥"); "(\d+)\*"); 0)))
I want to apply an arrayformula to my worksheet on Google Sheets, which works good when I drop-down the formula to the cells below. But because I have quite much data, I need to use the arrayformula for this formula and I can't find a solution how to apply the variable cell (in this example B11 and C11) to all cells below it.
The screenshot should explain my problem very well.
=COUNTIF((ARRAYFORMULA(IF((ARRAYFORMULA(IF(B11>$B$4:$B$7,IF(C11>$C$4:$C$7,1,0),0)))=1,IF((ARRAYFORMULA(IF($K$4:$K$7>$J$4:$J$7,1,0)))=1,1,0),0))),"1")
Here a link to my file:
https://docs.google.com/spreadsheets/d/1c17IQCujy3cQwDOcbJUpm3iCgJHCbD8QRbK0aQfVtQA/edit?usp=sharing
The output is in the green field
it would be like this:
=ARRAYFORMULA(MMULT(
IF(IF(INDIRECT("B11:B"&COUNTA(B11:B)+10)>TRANSPOSE(B4:B7),
IF(INDIRECT("C11:C"&COUNTA(C11:C)+10)>TRANSPOSE(C4:C7), 1, 0), 0)=1,
IF(IF(TRANSPOSE(K4:K7)>TRANSPOSE(J4:J7), 1, 0)=1, 1, 0), 0), {1; 1; 1; 1}))
I've been trying to graph only for the past few hours. I only want to graph the TRUE arguments of this ifelse statement
which(RawGame1$event_desc == "Off Rebound")
reb <- ifelse(RawGame1$event_desc_id == "O",1,"")
Right now whenever I try to plot with ggplot, I get a bar graph where 13/22 bars are the 3rd argument(pointless data) that skews the scales and dimensions horribly. How do i delete them? Am i trying to graph it wrong?
ggplot(RawGame1[,], aes(x = pid.first.char, fill = reb)) +
geom_bar() +
ggtitle("Off Reb by Player") +
xlab("Player") +
ylab("Total Rebounds")
There has to be a simpler way i don't know about!?!? New to R and appreciate any help. Be gentle.
It would be much easier to answer if you provided a sample of your data (at least what head(RawGame1) prints out), also what the plot looks like now and what's the goal.
But I see that you have brackets without any filtering condition in RawGame1[,] - if you intended to select only event_desc_id=="0" there, just write RawGame1[RawGame1$event_desc_id==0,].