I use the INIDRECT function in Google Spreadsheet to retrieve a defined cell range via the INDEX function. The formula in german declaration looks like this:
=IF(ISTZAHL($P2955),$P2955*IFERROR(INDEX(INDIRECT(CONCATENATE("projects_",$O2955,)),$B2955),1),"")
All worked fine since a year and now it doens't work anymore.
If I use the INDIRECT formula only it shows me the following error:
Parameter 1 of the function INDIRECT uses the value: "projects_GBP"
This is no valid range value.
If I specify the range value "projects_GBP" without INDIRECT function it will find the value.
Was there a change in the INDIRECT formula or why does my formula no longer work?
Out of nowhere it works again like a charm. Nothing has been changed.
Seems like it was/is an error from google.
Related
I'm trying to find the min date for sub-tasks that are related to the same Task ID.
Because I want to leave the task min date cell blank if none of the sub-tasks have a date entered, I use the following formula:
=if(SUMPRODUCT(regexmatch($A18:$A,"^Sub-Task "&$B16&".[0-9]"),$F18:$F=$F16,G18:G<>"")<>0,minifs(G18:G,$A18:$A,regexmatch($A18:$A,"^Sub-Task "&$B16&".[0-9]"),$F18:$F,$F16,G18:G,"<>"),"")
This breaks downs as follows:
In the SUMPRODUCT function
I use regexmatch($A18:$A,"^Sub-Task "&$B16&".[0-9]*") to check that I only look at sub-tasks that have the same ID as the specific task "B16"
I use $F18:$F=$F16 to check that I only look for "Planned" dates, which is in "F16" instead of "Actual" dates
I use G18:G<>"" to check that I only look for date cells that aren't empty
If the sumproduct results in something, I then use the minifs() function to find the min value of the result.
IF the sumproduct results in nothing, I enter blank "" in the cell
The sumproduct seems to work perfectly well and gives me the results that I expect when I change values around, but the minifs function doesn't seem to work with regexmatch()
Is there a different syntax that has to be used in minifs functions?
try:
REGEXMATCH(A18:A&"", "^Sub-Task "&B16&".*")
inserting numeric value in regex will cause VALUE error
Figured it out, minifs can take regex directly, but only simple ones; it doesn't like characters like "^", and I was able to work around it for my needs.
in Google Spreadsheets I have a column A with dates and column B with specific values corresponding these dates:
A
B
10-Jan
51.1
11-Jan
49.2
14-Jan
50.3
If I find via VLOOKUP function the value of 11-Jan, it will work and show 49.2.
Off cause it won't work if I try to find a value of 13-Jan since it is absent from the list of dates. However, if the date is absent in column A I want to get the value of earlier date which is in the list (i.e. I want to get 49.2 corresponding to 11-Jan, if I use 13-Jan as the query for finding the value).
Maybe this type of search can be realized by using INDIRECT function, but I can't figure out the formula.
How do realize this?
Your problem can be solved by using vlookup only but with different parameter, if you indicate True for the last parameter, it mean the formula will try to return the closer match if it cannot found any result.
=arrayformula(VLOOKUP(E1:E5,A:B,2,True))
The ArrayFormula I'm using is doing a cumulative calc, so col D is cumulative... eg =D1+C2 etc. Works fine when I create the ArrayFormula except for the first calc - since D1 is a header (text), not a number.
I tried an IF(), to check IsNumber(), but no good, same error. Any suggestions on how to correct this error?
Sorry, just fixed it. I had tried to use IFERROR(), but did it incorrectly before, now works when I use:
=ArrayFormula(iferror(D1:D1957+C2:C1958,C2:C1958))
in a google spreadsheet I want to use the formula SUMIF;
the syntax of function is SUMIF(A1:A10,"Paid",B1:B10)
as first parameter (and last) I want use a range of another google sheet;
I used the function IMPORTRANGE but the result is always #N/A
my code is:
sumif(importrange("xxhEwtMr2xxzRmiucxRgA5P119SEmsqL2R08gggt4Yyg", "list!$E:$E"),$S7,importrange("xxhEwtMr2xxzRmiucxRgA5P119SEmsqL2R08gggt4Yyg","list!$C:$C"))
where am I wrong?
ps.
the error pop-up report:
Error
Argument must be a range.
My understanding is that the third argument in the SUMIF must be a direct reference to the local worksheet.
You can either add an additional tab to import the data into, or try a different formula approach such as:
=SUM(QUERY(importrange("xxhEwtMr2xxzRmiucxRgA5P119SEmsqL2R08gggt4Yyg", "list!$C:$E"),"select Col1 where Col3 = '"&$S7&"'",0))
You could make an easier work around is to use the import range to a new sheet.
Then sumif it from that sheet. It will still dynamically update.
I'm trying yo create a formula in google spreadsheet that calculates the maximum value for all the cells above the current cell, in a way I can copy it to any cell and still workss. I tried using the ADDRESS function like this:
=MAX(ADDRESS(1;COLUMN()):ADDRESS(ROW()-1;COLUMN()))
But I get an parse error. I tried many variants of this code, but always get an error. Apparently, the ADDRESS function is not allowed as part of a range.
Is there any way to create a reference to a range based on the current cell position?
Was stuck on something very similar. Something like this should work.
=MAX(INDIRECT(1, COLUMN()) & ":" & ADDRESS(ROW()-1, COLUMN())))
This might be useful too if you want to get the sting address for a range:
=ADDRESS(row(A3:A6),COLUMN(A3:A6))&":"&ADDRESS(row(A3:A6)+rows(A3:A6)-1,COLUMN(A3:A6)+COLUMNS(A3:A6)-1)
This will return a string on the range, in this case
$A$3:$A$6
Using the INDIRECT function on your range string returns a range reference, which can then be used in a formula, eg.
INDIRECT(ADDRESS(1;COLUMN()):ADDRESS(ROW()-1;COLUMN()))
should work in
MAX(INDIRECT(ADDRESS(1;COLUMN()):ADDRESS(ROW()-1;COLUMN())))