I have an Excel spreadsheet made up of 2 sheets.
The first sheet is just data that has been imported.
The second sheet is a number of formulas that will extract various counts and totals from the first sheet.
The first formula is as follows
=COUNTIFS(Raw_data!B2:B1780,"Y7",Raw_data!F2:F1780,"M",Raw_data!G2:G1780,"D",Raw_data!L2:L1780,"EN")
It looks at 4 columns in the first sheet and counts the number of records that meet the criteria in each column.
This works fine. However, the number of rows in the raw data (1780) could vary. I have a found a formula that works out the number of rows in the raw data and that works OK. So what I was trying to do, was instead of having the number of rows fixed at 1780, have the above formula get the the number of rows from the cell that has done the row calculation.
So I ended up with this
=COUNTIFS(Raw_data!B2:INDIRECT(CONCATENATE("B",G3)),"Y7",Raw_data!F2:F1780,"F",Raw_data!G2:G1780,"D",Raw_data!L2:L1780,"EN")
where G3 contains the calculated number of rows. (I've only done this for raw data column B at present, as I wanted to prove it first). Excel comes back with #VALUE! in the formula cell, no matter what variations I try. I suspect the answer is very simple, but at present it eludes me.
Related
I am attempting to count the number of blanks in a large (1 million + cells) dataset, that has been pulled through using a =FILTER formula (from a larger dataset).
Due to the way Excel handles the =FILTER formula, every single cell is populated with =FILTER, even if it's only pulling a blank value.
Is there any way to count the blank values that are in the =FILTERed dataset? I've tried using =COUNTBLANK and =COUNTIF('RANGE:RANGE'=""), but because the cells aren't physically empty, they just have no value, it always yields zero.
The thing is, the same formula works fine in Google Sheets, as Google Sheets doesn't appear to put =FILTER into every cell of the filtered array. I've included an example here showing a dummy example of my dataset, including a side-by-side screenshot of how it behaves in Google Sheets Vs Excel: https://docs.google.com/spreadsheets/d/1-_mULvQG580EqSMci9gY3Ccll3yjwILTwI6TxglUQgs/edit#gid=0
Any help would be appreciated. Thanks!
The only way I know how to do it is by counting the number of rows and subtracting the cells that contain "PENDING".
=ROWS(J4:J7)-COUNTIF(J4:J7,"PENDING")
In your representative data in Excel, the cells aren't blank but have a value of 0 so you can just count that:
=COUNTIF(J4:J7,"0")
If you want a count of "true" blank cells (although COUNTBLANK should work for this) you can check the length of text in the cells using:
=SUMPRODUCT(--(LEN(J4:J7)=0))
Or
=ROWS(J4:J7)-SUMPRODUCT(--(LEN(J4:J7)>0))
I work in office Excel online at it seems it is different than "regular" office. I have a standard case of two excel sheets that contain two matching columns both A columns (starting with 2 row, first is title of row). In first sheet I need to add second column value from second sheet where values from A match. This seems easy but, for some reason in online office this simple formula does not work:
=VLOOKUP(A2,Sheet2!$A$2:$B$4170,2,0)
this gives just N/A result although matching value in Sheet2 exists.
Column is in both sheets A, with title sku in row 1. Second sheet contains additional data in column 2 (B) which I want to put in F column of Sheet1 using this formula.
Can you tell me why this doesn't work? IS office.com different in term of formulas?
Also, when I pull down this formula this A starting number in "Sheet2!$A$THISNUMBER" gets bigger, like
=VLOOKUP(A3,Sheet2!$A$3:$B$4170,2,0)
I have two excel spreadsheets. The first column of each is a column of serial numbers. Basically I need to take the first sheet, match the serial numbers from the other sheet (they are out of order and some are missing) and the fill in the unique data from the fist sheet into the appropriate columns of the second sheet. Does that make sense? I'm an excel noob, but I'm trying to learn! Thanks!
You could use VLOOKUP in order to do that. In cell B2 on your second sheet, use the formula
=VLOOKUP($A2,Sheet1!A:B,2,FALSE)
From this, just add the column range as the second input between the serial number and the column you want to look up. Then repeat for each column.
This picture shows the setup in the first sheet:
All of the data is hard coded.
This picture shows the setup in the second sheet.
As #timthebomb suggests, the formula in the second column (second row) is the following Vlookup:
=VLOOKUP(A2,Sheet1!$A$2:$B$9,2,FALSE)
I don't know what formula to use to verify that the numbers in one cell in sheet one are the same with numbers found in sheet 2 arranged in columns. I tried with vlookup but that works only if I search between cell to cell, rows to rows or columns to columns. Can i use a formula/several to find what data I am missing from one cell to several rows? Thanks
UseĀ
=(COUNTIF(E2:E100,A1)>0)+0
instead of
=VLOOKUP(A1,E2:E100,0)
where A1 houses the lookup value and E2:E100 is the first column of the lookup table of interest. Adjust the ranges to suit.
(source: http://www.mrexcel.com/forum/excel-questions/10000-how-compare-value-list-values-see-if-fir.html)
I think this could help you too: https://superuser.com/a/601421
I want to create a TOTAL row at the top of my spreadsheet. In this row, each cell should be the SUM of the values in the column below the TOTAL row.
So for example, if the total row is Row 1, cell A1 should be the SUM of A2 through the last row in column A. The number of rows in the spreadsheet will grow over time, so I can't just say SUM(A2:A500) because eventually there will be row 501, 502, 503 etc.
If you want something that just works in Google Spreadsheets (as the title suggests), you can use open-ended ranges:
=SUM(A2:A)
In Excel, you can specify the maximum rows for that version; for example, for 2007 and 2010:
=SUM(A2:A1048576)
This will work in Google Spreadsheets as well, and is beyond the current theoretical row limit in GSheets (400000)*.
Edit: *The quoted limit of the new version of Sheets is actually now 2 million cells.
Try this
=SUM(OFFSET(A1,1,0,ROWS(A:A)-1,1))
Works in both Excel and Google Docs
One downside: by using OFFSET the formula becomes Volatile ie is calculated every time the sheet calculates irrespective of data change.
One way you can do this in both Excel/Google Spreadsheets is to add a dummy column with a single value at the top (and all blanks for the remainder of the column).
You can then do a SUMIF to summarize all values except the one which is not "" - which should just be the cell A1 - put the following in B1, with whatever numbers below B1 you want and anything in A1.
=SUMIF(A:A,"",B:B)
=(B3+C3+D3+E3+F3+G3+H3+I3+J3+K3+L3+M3)
This worked for me. 3 being the row number
When you Drag the box downward the formula transfers down and changes the row number automatically for each row.
After I put another heading several rows down
adding the word SUM into the formula worked.
=SUM(B19+C19+D19+E19+F19+G19+H19+I19+J19+K19+L19+M19)
Not sure if it was necessary. But just copy pasting the first formula I used into the lower segment made an error message.