SUMIFS when date is column header

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
306
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I have a calendar that scrolls left and right and I'm trying to figure out how to use SUMIFS on it. If the date in the calendar matches the date on Table5 I need to search the column for that date for entries where the first letter is an "L". I know how to do this when the date is in a single column, but I don't know how to modify the formula for when the date is the column header. Do you have any suggestions?
The formula I used to search a different table where the date is a column is
Excel Formula:
=SUMIFS(Table3[Recordables],Table3[Date],A2)
.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Can you post some sample data showing what you are trying to do.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

Table headers are text, so you need to convert that into a real date.
 
Upvote 0
I'm using a work computer so XL2BB cannot be used.

I've attached a screenshot "1.png" of the calendar I am trying to search. Row 7, the date row, is written as 1/1/2022, 1/2/2022, 1/3/2022 but custom formatted to only display the day since the month is displayed between the arrows. Would the formatting displayed have to match for Excel to find it? Meaning, if I have 1/3/2022 on the table where I am using the formula and telling Excel to find the same date in row 7 of the calendar, will it be able to find it if the date displayed on the calendar only displays the day "03" regardless of the cell containing 1/3/2022?

Wow. I hope that makes sense. Explaining Excel can be so confusing my eyes cross...
 

Attachments

  • 1.PNG
    1.PNG
    44 KB · Views: 16
Upvote 0
That does not look like a table & gives me no idea of what you are trying to count.
 
Upvote 0
That does not look like a table & gives me no idea of what you are trying to count.
I am trying to have Excel to look look at row 7 (the date) and find any cells in the associated column that have an L and total the number next to the L.
I will try to explain further.
I want to search row 7 (the date) from "1.png" for a date that matches another table (see attached image "2.png"). The formula I'm trying to develop will be the table in 2.png column M. I need to search 1.png and have it sum the "L" values for a given date.
For example, in column E of 1.png, date 1/4/2022, has one cell that has an L8 (which stands for 8 Loss-Time hours) so the formula should provide the result of 8. If there was a value of L8 in one row and an L4 in another row of the same column, the result of the formula should be 12.
Does this help clarify?
 

Attachments

  • 2.PNG
    2.PNG
    41.7 KB · Views: 16
Upvote 0
How about
Excel Formula:
=LET(Rng,INDEX(RecordableLossTracker!$B$10:$NI$50,,MATCH(A2,RecordableLossTracker!$B$7:$NI$7,0)),SUM(FILTER(MID(Rng,2,10)+0,LEFT(Rng)="L",0)))
 
Upvote 0
Solution
How about
Excel Formula:
=LET(Rng,INDEX(RecordableLossTracker!$B$10:$NI$50,,MATCH(A2,RecordableLossTracker!$B$7:$NI$7,0)),SUM(FILTER(MID(Rng,2,10)+0,LEFT(Rng)="L",0)))
Awesome! That appears to do it! Thank you! I appreciate your help!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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