What formula can make table headers values capable of being referenced in equations?

uptopjimbo

New Member
Joined
Jan 16, 2019
Messages
9
Hello!

I have an excel table that I'm building for scheduling / planning purposes. I want to be able to utilize the headers as date values that I can reference for summing assigned hours that are in a column whose header date is greater than the last day of the previous week. The formula I'm using does calculate without errors but, it doesn't calculate correctly. It simply just sums everything in the row regardless of the date value input as a condition to back-check against. Screenshot attached.
Screen Shot 2022-02-22 at 10.11.38 AM.png

I currently have this equation which calculates 32 hrs in the top row of the table:
=SUMPRODUCT(--(Table29[[#Headers],[2/28/22]:[12/26/22]]>$P$7),Table29[@[2/28/22]:[12/26/22]])

In this equation P7 is the manual date entry cell I'm using to see if the equation is working. Eventually once this works I will add an equation to auto-calculate that "TODAY()-WEEKDAY(TODAY())+1" but, for now I need to get it to work before I do anything.

Thanks in advance! Happy to provide any other information.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Table headers are always text, and text is treated as greater than any number (dates are numbers too in Excel), hence your result. You could try wrapping the headers in a DATEVALUE function assuming those date strings match your regional format:

Excel Formula:
=SUMPRODUCT(--(DATEVALUE(Table29[[#Headers],[2/28/22]:[12/26/22]])>$P$7),Table29[@[2/28/22]:[12/26/22]])
 
Upvote 0
Solution
That worked! Thank you so much. I swear I tried that but, I wasn't wrapping the entire table in that. Thanks again!
 
Upvote 0

Forum statistics

Threads
1,216,153
Messages
6,129,176
Members
449,491
Latest member
maxim_sivakon

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