I know this answer is out there, I am just not using the write words to ask.
In cell B1 I have "Form Responses 1'!$C:$C" written out.
In cell B3 I have a countif formula that I would like to use the contents of cell B1 as the range. So something like the below
=COUNTIF(B1,"Option 1"), or I have tried =COUNTIF(Indirect(B1),"Option 1")
Both don't see the the contents of B1 as a range, and therefore it is not giving me a count of the items in the range.
Try this without B cells:
=COUNTIF('Form Responses 1'!C:C,"Option 1")
Thanks to Abdul Hameed, I came up with two solutions.
Cell B1 = "C"
my countif formula is: =COUNTIF(INDIRECT("'Form Responses 1'!$"&B1&":$"&B1),"Option 1")
or to directly answer my first question
Cell B1 = Form Responses 1!$C:$C (no double or single quotes)
=COUNTIF(INDIRECT(B1),"Option 1")
Related
my question is simple enough. It involves, using XLOOKUP formula. So, following is the issue, I'm facing.
I have master data sheet, which I'm using for the lookup reference.
In sheet XLOOKUP test, I'm looking up the Task Completion Status for the search keys Sl No. in cell C3 and Date in cell C4.
I've applied the formula-
XLOOKUP($C$3&$C$4, 'Master Data'!$A$2:$A$9&'Master Data'!$C$2:$C$9, 'Master Data'!$D$2:$D$9, , 0, 1)
But, it pops out an #N/A error message with Array arguments to XLOOKUP are of different size..
So what am I doing wrong ?
Here's a link to my sheet, if needed.
To combine columns into a compound key, you need to wrap the formula in arrayformula(), like this:
=arrayformula( xlookup(C3 & C4, 'Master Data'!A2:A9 & 'Master Data'!C2:C9, 'Master Data'!D2:D9) )
Alternatively, use filter():
=filter('Master Data'!D2:D9, C3 = 'Master Data'!A2:A9, C4 = 'Master Data'!C2:C9)
See your sample spreadsheet.
I am using IF function as below and getting the result, but when I use the same function with ARRAYFORMULA am getting the circulating dependency error:
Without ARRAYFORMULA
=if(isblank(A2),"",IFERROR(IF(A2<>A2,1,B1+1) ))
With ARRAYFORMULA =ARRAYFORMULA(IF(A2:A<>A2:A,1,C1:C+1) )
Further, the result of formula is getting started from cell No. B3, is it possible to get the result started from cell B2 i.e. the cell in which the formula is applied.
Below is the link of the sheet:
https://docs.google.com/spreadsheets/d/1qLjYukNR1E_vgwqeGutQRtg3H7-3eU2heUPHsqQpg90/edit#gid=1713558709.
Any help on above will be greatly appreciated.
I have added a new sheet ("Erik Help") to your sample spreadsheet. This array formula can be found in B1 of that sheet:
=ArrayFormula({"Header"; IF(A2:A="",, ROW(A2:A)-VLOOKUP(ROW(A2:A),{1;FILTER(ROW(A2:A),A2:A="")},1,TRUE))})
You can change the header text as you like.
Here is a plain-English interpretation of the rest of the formula: "If a cell in A2:A is blank, leave it empty; otherwise, subtract the row number of the last empty row from the current non-blank row number. If A2 is non-blank, return 1."
On sheet Summary, I have a cell A1 that has a value "AAPL"
On sheet AAPL, I have a cell X22 that has a value "123"
In order for me to display "123", I do =AAPL!X22. Pretty straightforward.
How can I rewrite this using A1 value? In other words instead of hardcoding AAPL, I would like to express .. whatever is in A1 cell
I tried
=&A1!X22 but this didn't work.
Thank you for your time
Use INDIRECT. Enclose the !X22 in quotes and do not put quotes around the reference to the cell containing AAPL (in your question A1, or in the comments D30):
=INDIRECT(D30&"!X22")
If A1 has a value of 2, =INDIRECT("L"&(5+A1)) will return me cell L7's content. And my A1 value keeps on being updated.
But I need a way to sort through columns instead of rows, like
L7, M7, N7, O7 and so on...
Which formula can help me sort through the columns? I also know that =COLUMN() returns the current column converted to number, but I had no luck with =INDIRECT((column()+A1)&7).
You can use the address() function inside indirect. Address() returns a cell reference as a string. So for example, if you enter in G5
=indirect(address(A1, column()))
while A1 is 1 the above formula will return the contents of cell G1.
See if this helps?
Good day,
I have a countif(concatenate)) and another countif(concatenate). I am looking for a formula that takes the first countif total and the second countif total and dividing the answer of the two.
Help would much appreciated.
Thanks.
From the tag i suggest that you use Excel 2010. Let us assume that you already got the value of countif(concatenate1) in a cell called A1 and the value of countif(concatenate2) in a cell called A2.
A formula to divide A1 by A2 and store the result in A3 would be:
=A1/A2 (place this code in cell A3).
You might want to look into this, too: https://support.office.com/en-us/article/COUNTIF-function-e0de10c6-f885-4e71-abb4-1f464816df34