How to identify the right starting point of a sum based on criteria?

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
592
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have the two rows:


26/09/2018 27/09/2018 28/09/2018 29/09/2018 30/09/2018 01/10/2018 02/10/2018 03/10/2018 04/10/2018 05/10/2018 06/10/2018 07/10/2018 08/10/2018
4 5 2 0 0 0 6 9 7 0 0 2 4


(copy/paste them in excel as I have no idea how to paste as table)

In a separate cell, I have:

01/10/2018

I want in the third row below the first two, to have this:
1) if the top date is before the separate date (01/10/2018), fill with zero
2) if the top date is after the separate date (01/10/2018), fill with the below:
divide the value of the cell above to the value of the sum of a cell range
that cell range starts from the second row cell that the first row date is the FIRST date that is after the separate cell date
and the cell range ends at the end of the row

I assume this needs some kind of lookup function to identify the right point where the cell range of the sum starts.
However, I would prefer to use index/match as I want to learn more about that function.

Thanks!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
I have assumed the "separate cell" is in A10
put this in cells A3
<a1,(a2 sumif($a1:$m1,"=""><a1,(a2 sumif($a1:$m1,"=""><a1,(a2 sumif($a1:$m1,"=""><a1,(a2 sumif($a1:$m1,"=""><a1,(a2 sumif($a1:$m1,"="">equals ( IF ($A$10 < A1 , (A2 / SUMIF ($A1:$M1, " > " & $A$10,$A2:$M2)) ,0 ))
and copy across</a1,(a2></a1,(a2></a1,(a2></a1,(a2></a1,(a2>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,259
Members
452,626
Latest member
huntinghunter

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