SUMIF not working when referencing a cell with a formula

cmacnab

Board Regular
Joined
Jun 24, 2013
Messages
57
Office Version
  1. 2016
Platform
  1. Windows
Hi, I'm building a new worksheet with a sumif function. One of the cells the formula refers to is itself a formula and the sumif is not working. When I remove this part of the sumif, the formula works so I know this part is the issue. This is the formula I'm using:
=SUMIFS('Punch Report'!$J:$J,'Punch Report'!$A:$A,$A6,'Punch Report'!$U:$U,$C6,'Punch Report'!$B:$B,">=09/27/2021",'Punch Report'!$B:$B,"<=10/03/2021")

The part that is causing the formula to not return a result is 'Punch Report'!$U:$U. Column U on the Punch Report is a Vlookup function that returns a value from another tab. I'm not sure why this is not working as I have another spreadsheet that I do the exact same function, just different columns, and it works fine.

Anyone have any ideas why this is?
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
That part of the formula will not be the issue, the problem will be that the vlookup results in column U are not the same as the value in C6. Without seeing the vlookup formula, the result it returns, and the content of C6, it is going to be difficult to identify the reason without a lot of guesswork.
 
Upvote 0
Do you require over a million rows?
Is the lookup returning Text or Values?
Does the formula work if the date criteria is a reference to cells?
You can format the dates to your preference.
N.B. You can post a concise extract of your data with the forum's tool XL2BB.

T202110a.xlsm
ABCDJ
1
2100
320210927
420211003
5
6AAX
7AA2021092420
8AA2021100140
9AA2021100260
10AA2021100480
1c
Cell Formulas
RangeFormula
J2J2=SUMIFS($J7:$J10,$A7:$A10,$A6,$U7:$U10,$C6,$B7:$B10,">="&J3,$B7:$B10,"<="&J4)
 
Last edited:
Upvote 0
Figured out the issue. Had the wrong codes in the table that that the lookup formulas were referring to, lol. Thank you for your help.
 
Upvote 0
Solution

Forum statistics

Threads
1,215,636
Messages
6,125,959
Members
449,276
Latest member
surendra75

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top