I have five sheets named Sheet1, Sheet2, ..., Sheet5. I want to sum up the values from cell A2 to cell A10 over all these sheets. But I only want to include a sheet in this sum if its value in cell A1 is equal to 3. What is the formula I require to achieve this?
This code should be the end all be all on your question.
It checks each sheet and adds all the numbers (from A2 to A10) from the sheets inwhich A1 = 3 and excludes the sheets that does not meet the requirement.
I tested it.
=SUM(IF(sheet1!A1=3, SUM(sheet1!A2:A10), 0),IF(sheet2!A1=3, SUM(sheet2!A2:A10), 0),IF(sheet3!A1=3, SUM(sheet3!A2:A10), 0),IF(sheet4!A1=3, SUM(sheet4!A2:A10), 0),IF(sheet1!A5=3, SUM(sheet5!A2:A10), 0))
Try this:
=SUM(IF(N(INDIRECT("'Sheet"&{1,2,3,4,5}&"'!A1"))=3,SUMIF(INDIRECT("'Sheet"&{1,2,3,4,5}&"'!A2:A10"),">0")))
Regards
Related
I have been using VLOOKUP() to populate worksheets with Inventories, however I'm stuck with an issue where one column has the same value in multiple cells, I need to match 2 cells from sheet 2 with sheet 1 and have it return the 3rd cell from sheet 1 into sheet 2.
I'm working with about 350 rows in both sheets, and in some cells the same/different values repeat it self hence needing it to match with 2 cells in the same row.
This is the formula I currently use:
=VLOOKUP(A1&L1,'Sheet1'!$A$1:$E$351,3,FALSE)
I'm expecting it to return the value that's in the 3rd column on sheet 1 in the row that matched the values of Cell A1 and L1 in sheet 2. and the same going on A2 & L2 then A3 & L3 and so forth.
Unless you have values in Column A of your 'Sheet1' that are the equal to to concatenation of your values in Columns A and L in 'Sheet2', the formula will not work.
Instead, I'd try FILTER if you have the newest version of Excel. Something like:
=FILTER('Sheet1'!$C$1:$C$351,
(('Sheet1'!$A$1:$A$351=A1)*('Sheet1'!$L$1:$L$351=L1)))
Another option is INDEX. Something like:
=INDEX('Sheet1'!$C$1:$C$351,
MATCH(A1&L1, 'Sheet1'!$A$1:$A$351&'Sheet1'!$L$1:$L$351,0),
3)
The only way to do this task is to use a helper column
Go to Sheet one where the data table is, insert a column at the starting point of data e.g your Data set starting in SHEET1 from the column A. so insert new column in A
use this formula in A1
=CONCATENATE(B1,C1,D1,E1,F1) Press Enter, Drag the formula down to A351
now go to sheet2 and use this formula in the result cell
=VLOOKUP(A1&L1,'Sheet1'!$A$1:$F$351,4,0)
I'm trying to sum a specific column in that repeats in some sheets with Macro Excel and I'm quite lost...
I have 10 different sheets and in each one the column that I'm trying to sum is in a different letter. Also, each sheet has a dynamic count of rows.
Could you show me what code I need to write to sum the column in all the sheets at once?
Thank you so much!
You can use this formula to sum or do anything in other sheet:
Example you want to sum the value from A1:A5 in Sheet1 and store it in the B3 in Sheet2, you can use this formula in cell B3 in Sheet2 like this:
=SUM(Sheet1!A1:A3)
Best,
Tung Duong (Thomas)
I have a Excel spreadsheet with original data in the range A1:A100
I want cell B1 to be the sum of A1:A5, B2 = sum(A6:A10), B3 = sum(A11:A15) and so on. What formula can I use for cell B1, that allow me to copy it to others B cells to achieve the above?
Thanks and Regards,
Nhan.
=SUM(OFFSET(A1,4*(ROW(A1)-1),,5))
Anyone who could give me the excel formula for this? Thank you!
If B2 in sheet 1 matches any cell from column A of Sheet 3, copy the cell found on the right of that (column B).
Copying to a cell in sheet 1.
Thanks! (I hope this isn't too confusing.)
For example B2 is "8 December". Then there is a list of dates on Column A of Sheet 3. On column B of sheet 3 is a corresponding time. So for example, on the right of 8 December on Sheet 3 is 8:30, I want that to be copied on the cell I'm making a formula on.
Some folk use the LOOKUP function for this, but I like to use MATCH and INDEX because it gives you more freedom for more advanced formula (such as checking if there was a match or not) and has less requirements (such as data doesn't need to be sorted).
=INDEX(Sheet3!B:B, MATCH(Sheet1!B2, Sheet3!A:A, 0))
If you break it down into the parts, MATCH(Sheet1!B2, Sheet3!A:A, 0) returns the row number for the first matching cell in column A of sheet Sheet3. Then INDEX(Sheet3!B:B, ...) returns the value of the cell in column B of sheet Sheet3 at a specified row number.
If nothing matched, then you'll get a #NA error value.
I'm looking for a formula on excel to do the following.
If a value on a spreadsheet is a match to a value on another spreadsheet:
Then paste the cell next to the match from the first spreadsheet
into the cell next to the match on the other spreadsheet.
This is for a stock spreadsheet from my supplier, it is 2 columns, 1 with an item code and the 2nd with a quantity in stock.
I need to check if the code exists on my other spreadsheet and if so paste the stock quantity from the shop spreadsheet in the cell next to the match on my spreadsheet.
The LOOKUP and VLOOKUP functions seem to be what you need here.
Simply comparing one cell to another as other answers indicate will require both data sets to be in the same order and without gaps. LOOKUP and VLOOKUP remove this restriction.
Assume two worksheets W1 and W2. W1 and W2 both have columns A. You want to check, for example A1 on W1. If it matches A1 on W2, then you paste A1 from W1 to B1 on W2. Put this code in B1 on W2:
=IF(W1!A1=W2!A1,W1!A1,"")