Point at which a range of cells equals specified value

allemanable

New Member
Joined
Nov 14, 2014
Messages
8
I have data that shows the amount of earnings earned each quarter by customer on sheet 1
[TABLE="width: 500, align: left"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Quarter[/TD]
[TD]Quarterly Earnings[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]1Q16[/TD]
[TD]$5.00[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]2Q16[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]3Q16[/TD]
[TD]$15.00[/TD]
[/TR]
[TR]
[TD]5678[/TD]
[TD]1Q16[/TD]
[TD]$5.00[/TD]
[/TR]
</tbody>[/TABLE]







On sheet 2, data shows
[TABLE="width: 500"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Earnings Due[/TD]
[TD]Quarters To Be Paid[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]$25.00[/TD]
[TD]??[/TD]
[/TR]
[TR]
[TD]5678[/TD]
[TD]$5.00[/TD]
[TD]??[/TD]
[/TR]
</tbody>[/TABLE]
I am trying to find a formula/macro that will look up customer 1234, find the point at which earnings = $25.00 and bring back the quarter at which point this happens (2Q16). Any suggestions??
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I have data that shows the amount of earnings earned each quarter by customer on sheet 1
[TABLE="width: 500, align: left"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Quarter[/TD]
[TD]Quarterly Earnings[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]1Q16[/TD]
[TD]$5.00[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]2Q16[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]3Q16[/TD]
[TD]$15.00[/TD]
[/TR]
[TR]
[TD]5678[/TD]
[TD]1Q16[/TD]
[TD]$5.00[/TD]
[/TR]
</tbody>[/TABLE]







On sheet 2, data shows
[TABLE="width: 500"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Earnings Due[/TD]
[TD]Quarters To Be Paid[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]$25.00[/TD]
[TD]??[/TD]
[/TR]
[TR]
[TD]5678[/TD]
[TD]$5.00[/TD]
[TD]??[/TD]
[/TR]
</tbody>[/TABLE]
I am trying to find a formula/macro that will look up customer 1234, find the point at which earnings = $25.00 and bring back the quarter at which point this happens (2Q16). Any suggestions??

Sheet1:

D2=SUMIF($A$2:A2,A2,$C$2:C2) drag down


Sheet2:

C2=INDEX(Sheet1!$B$2:$B$5,MATCH($A2,Sheet1!$A$2:$A$5,0)+MATCH($B2,OFFSET(Sheet1!$D$1,MATCH($A2,Sheet1!$A$2:$A$5,0),0,COUNTIF(Sheet1!$A$2:$A$5,$A2),1),1)-1)
 
Upvote 0

Forum statistics

Threads
1,226,114
Messages
6,189,051
Members
453,522
Latest member
Seeker2025

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