Help with SUM function

excelnoob123123

New Member
Joined
Oct 4, 2021
Messages
3
Platform
  1. Windows
Hi, I have illustrated here what I am trying to do
I am trying to make a formula for "max days" and "recent consecutive days". Columns C and beyond are from a pivot table, whereas A and B cells are within that sheet. So eventually, columns J, K, L, and so on will be added and I need a function that will match this when the pivot table recalls information from new entries
1633324782421.png


Thank you so much for your time. Had a headache trying to figure this out on my own spending over 5 hours that I decided its best I ask for help before I go crazy
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Book1
ABCDEFGH
1431111
Sheet1
Cell Formulas
RangeFormula
A1A1=COUNTA(D1:XFD1)
B1B1=MAX(FREQUENCY(IF(D1:XFD1>0,COLUMN(D1:XFD1)),IF(D1:XFD1=0,COLUMN(D1:XFD1))))
Press CTRL+SHIFT+ENTER to enter array formulas.


Hi Please try this.
 
Upvote 0
Book1
ABCDEFGH
1431111
Sheet1
Cell Formulas
RangeFormula
A1A1=COUNTA(D1:XFD1)
B1B1=MAX(FREQUENCY(IF(D1:XFD1>0,COLUMN(D1:XFD1)),IF(D1:XFD1=0,COLUMN(D1:XFD1))))
Press CTRL+SHIFT+ENTER to enter array formulas.


Hi Please try this.
Hi it works but the function fails for "evan" as the recent consecutive days should be 0

1633330645315.png
 
Upvote 0
This assumes that the dates in row 1 will not be entered in advance. If they are then there is no way of identifying whether or not the most recent cell is blank unless we work to a specific date.
If you are not using office 365 then you may need to array confirm the formulas in column B with Ctrl Shift Enter.
Book2
ABCDEFGHI
1MaxRecentName01-Sep02-Sep03-Sep04-Sep05-Sep06-Sep
243a1111
330b111
454c11111
Sheet1
Cell Formulas
RangeFormula
A2:A4A2=SUMIF($1:$1,">0",2:2)
B2:B4B2=LOOKUP(1E+100,FREQUENCY(IF($D2:INDEX(2:2,MATCH(1E+100,$1:$1))<>"",$D$1:INDEX($1:$1,MATCH(1E+100,$1:$1))),IF($D2:INDEX(2:2,MATCH(1E+100,$1:$1))="",$D$1:INDEX($1:$1,MATCH(1E+100,$1:$1)))))
 
Upvote 0

Forum statistics

Threads
1,214,907
Messages
6,122,185
Members
449,071
Latest member
cdnMech

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