I have multiple worksheets all using the same template
I have a summary page and have a formula that works for an individual sheet
=SUMPRODUCT(--(sheet1!F4:sheet1!F500>=A1),--(sheet1!F4:sheet1!F500
the formula checks the relevant ranges on sheet 1 and returns the values in the boxes in the date range specified in A1 and A2
The problem is that I want to do this for multiple sheets and use a 3D reference.
I have tried
=SUMPRODUCT(--(sheet1:sheet3!F4:sheet1:sheet3!F500>=A1),--(sheet1:sheet3!F4:sheet1:sheet3!F500
and also thrown in some extra brackets to be safe
=SUMPRODUCT(--((sheet1:sheet3!F4):(sheet1:sheet3!F500>=A1)),--((sheet1:sheet3!F4):(sheet1:sheet3!F500)
neither of these work and I am getting the #NAME? error
any ideas would be appreciated
Thanx in advance
Gary
Your formulas look like they are truncated, are you just trying to count dates between A1 and A2 inclusive? You can't use 3D references in SUMPRODUCT. In Excel 2007 you could use this formula
=SUMPRODUCT(COUNTIFS(INDIRECT("'"&G1:G3&"'!F4:F500"),">="&A1,INDIRECT("'"&G1:G3&"'!F4:F500"),"<="&A2))
where you have all your sheet names listed in G1:G3
Related
I have this formula on several sheets in cell F1
{=SUM(IF(MONTH(A3:A210)=1,B3:B210,0))}
I have this formula on a totals sheet
=SUM(Start:End!F1)
I've been trying to combine the two into one formula on the totals page. Thank you everyone getting me this far.
I ended up creating a pivot table using the wizard which allows you to choose multiple consolidation ranges.
I was given the idea here:
https://support.office.com/en-us/article/Consolidate-multiple-worksheets-into-one-PivotTable-3ae257d2-ca94-49ff-a481-e9fc8adeeeb5
I have an excel sheet which I need help with.
I have already took sum with
=SUM(INDEX(B3:K7,MATCH(A13,A3:A7,0),0))
formula and need to get the sum for specific data range. Like sum only for last 3 days from today.
Please help.
Try this SUMPRODUCT variant
=SUMPRODUCT(INDIRECT("B"&MATCH(A13,A3:A7)+2&":K"&MATCH(A13,A3:A7)+2),--(B2:K2>=(B10-3)),--(B2:K2<="B10"))
UPDATED
To have the formula in different sheet you need to include the sheet references. I suggested cutting and pasting it from Sheet2 to Sheet1 but missed out that the part inside INDIRECT will not be adjusted by Excel automatically.
=SUMPRODUCT(INDIRECT("Sheet2!B"&MATCH(A13,Sheet2!A3:A7)+2&":ZZ"&MATCH(A13,Sheet2!A3:A7)+2),--(Sheet2!B2:ZZ2>=(TODAY()-7)))
Hello I am trying to use countif to add up how many cells have January in. For example I have 40 worksheets and I need to find out how many of them contain january in the date in cell C3 on all of the sheets. and put the answer in another sheet.
OPTION 1) Formula Method
1) Write out a list of all the names of your sheets in a column.
2) On the "Formulas" ribbon, select Define Name.
3) Give it a name in the top box, ie. SHEETNAMES
Then use this formula:
=SUMPRODUCT(COUNTIF((INDIRECT("'"&SHEETNAMES&"'!C11")),"Completed"))
I would have thought the formula for your original question would have been very similar but it keeps showing up as an error. I have been using the following:
=SUMPRODUCT(--(MONTH(INDIRECT("'"&SHEETNAMES&"'!C3"))=1))
You can use a 3-D formula, but unfortunately, the only formulas that allow 3-D references are mathematical functions that don't have much in the way of logic (no IFs, ANDs, etc.). If you restructure your workbook a little bit to, say, add IF(C3="January",1,0) in Z3 on each sheet, then you can do SUM(Sheet2:Sheet40!Z3) on your summary sheet.
I trying to use a table on Sheet 3 as a reference for Sheet 1. The formula I'm using is =VLOOKUP(N1,Sheet3!A1:B15428,2,FALSE). This works for a single cell,but I cannot copy the formula to other cells in the same column. Every time I try Excel gives me an #N/A error.
I do not want to manually add the formula to 100,000 cells. What am I doing wrong?
If you need to see the spread sheet just message me.
Thank you,
Kim
Excel might be referencing cells that are out of range. Freeze the reference cells from Sheet 3 using $ symbol:
=VLOOKUP(N1,Sheet3!$A$1:$B$15428,2,FALSE)
You need to use absolute referencing instead of relative reference, same as mentioned in another answer.
You can check the issue by copying the formula to another cell and see the cells being referenced, the range will be shifted if relative reference is being used, which you are using right now.
Also, if you foresee that extra rows might be added in sheet3, then you can use whole columns i.e. A:B as reference and any additional rows will automatically be referenced.
=VLOOKUP(N1,Sheet3!A:B,2,FALSE)
In Excel 2007 I use the following formula to refer to cells in other worksheets in the same workbook:
=INDIRECT($B$2&"!A9")
B2 contains the name of the worksheet containing the target cells (I want to turn this into a template, so I don't enter the name into the formula). The formula works, but I want to use this same formula over multiple rows (A10, A11, A12 [...] A1000). I am using this same code over multiple rows but with different fields (B9, C9 and so on), with a variety of different content types (data, number, text).
An alternate version of the formula is as follows:
='Worksheetname'!A9
But again, this requires hard-coding the name of the worksheet, which is not desirable for me.
Because of the sheer volume of the rows manual editing is not an option: is there any way to alter this formula so I can easily use it over multiple rows? Preferably without the use of VBA, but that is not a requirement.
If your records are located in the same cells in both worksheets, then you can use something like following:
=INDIRECT($B$2&"!"&ADDRESS(ROW();COLUMN()))
IF now, then you can easily offset them using given ADDRESS function
P.S. Please be aware with INDIRECT function that it slows down calculation performance on your workbook (few functions are OK, but if you have 10,000 of them then you might see some delay)
If you want to use the same formulas for several columns as well you could include something like this:
=INDIRECT("'"&$B$2&"'!"&ADDRESS(MATCH($B4;INDIRECT(CONCATENATE ($B$2;"!";"B:B"));0);MATCH(B$3;INDIRECT(CONCATENATE($D$2;"!";"A3:AR3"));0)))
B2=reference to sheet name
B4=first row for your data
B3=Column header
For those who want to pull all the same column of data from multiple sheet that have the same layout (and have each cell linked), it took me hours to work it out, but actually can be solved with a relatively simple way:
=OFFSET(INDIRECT("'"&G$2&"'!l7"),$A6,0,1,1)
The Indirect part take you to the right sheet and right cell, G2, H2 ... has the Sheet names (be mindful of sheet name with space, you will need to use ' ', which is the case for my workbook), and L7 cell of that sheet, and I want L8, L9, ----L200 all being pulled through;
Offset help you navigate the range of rows, A6 is an additional numbering row I added to move to the right row in each sheet.
Hope it help!