water fall

Zubair

Active Member
Joined
Jul 4, 2009
Messages
304
Office Version
  1. 2016
Platform
  1. Windows
1 to 100 is available in cell from B2 to CW2,

Based on given data range A10 to C14 (column C) I want formula to bring 1& 2 against each fruits in B3 TO CW6 please help.

A3 = Apple (B3 to AT3 =1)
A4 = Banana (B4 to AT4 = 2 & AU4 to BX4 = 1)
A5 = Orange (B5 to BX5 = 2 & BY5 to CM5 = 1)
A6 = Peach (B6 to CM6 = 2 & CN9 to CW6 =1)


A10 to C14
Apple4545
Banana3075
Orange1590
Peach10100
Total100
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
No sorry its not complete formula B4 to AT4 is not showing 2
 
Upvote 0
Try this, with the formula copied out to column CW...
MrExcel20200908.xlsm
ABCDEFGHIJKLMNOPQRSTUVW
1
2
3Apple1111111111111111111111
4Banana2222222222222222222222
5Orange2222222222222222222222
6Peach2222222222222222222222
7
8
9# 1# 2
10Apple4545
11Banana3075
12Orange1590
13Peach10100
14Total100
Sheet2
Cell Formulas
RangeFormula
B3:W6B3=IF(COLUMNS($B3:B3)<=SUMPRODUCT(--($A$10:$A$13=$A3)*($C$10:$C$13-$B$10:$B$13)),2,IF(COLUMNS($B3:B3)<=SUMPRODUCT(--($A$10:$A$13=$A3)*($C$10:$C$13)),1,""))
B14B14=SUM(B10:B13)
 
Upvote 0
Solution
KRice - Yes thats the formula I was looking for Many thanks.
 
Upvote 0
Another option with a slightly reduced formula (some columns hidden to reduce size) ..

20 09 10.xlsm
ABCDEFGHIJKAKALAMANAOAPAQARASATAUAVAWAXBTBUBVBWBXBYBZCACBCCCDCECFCGCHCICJCKCLCMCNCOCPCQCRCSCTCUCVCW
1
2
3Apple11111111111111111111                                  
4Banana22222222222222222222111111111                         
5Orange22222222222222222222222222222111111111111111          
6Peach222222222222222222222222222222222222222222221111111111
7
8
9# 1# 2
10Apple4545
11Banana3075
12Orange1590
13Peach10100
14Total100
Waterfall
Cell Formulas
RangeFormula
B3:K6,AK3:AX6,BT3:CW6B3=IF(COLUMNS($B:B)<=VLOOKUP($A3,$A$10:$C$13,3,0)-VLOOKUP($A3,$A$10:$B$13,2,0),2,IF(COLUMNS($B:B)>VLOOKUP($A3,$A$10:$C$13,3,0),"",1))
B14B14=SUM(B10:B13)
 
Upvote 0
Or if you are happy to include another column in that bottom table, it reduces further

20 09 10.xlsm
ABCDEFGHIJKAKALAMANAOAPAQARASATAUAVAWAXBTBUBVBWBXBYBZCACBCCCDCECFCGCHCICJCKCLCMCNCOCPCQCRCSCTCUCVCW
1
2
3Apple11111111111111111111                                  
4Banana22222222222222222222111111111                         
5Orange22222222222222222222222222222111111111111111          
6Peach222222222222222222222222222222222222222222221111111111
7
8
9# 1# 2
10Apple45450
11Banana307545
12Orange159075
13Peach1010090
14Total100
Waterfall (3)
Cell Formulas
RangeFormula
B3:K6,AK3:AX6,BT3:CW6B3=IF(COLUMNS($B:B)<=VLOOKUP($A3,$A$10:$D$13,4,0),2,IF(COLUMNS($B:B)>VLOOKUP($A3,$A$10:$C$13,3,0),"",1))
D10:D13D10=C10-B10
B14B14=SUM(B10:B13)
 
Upvote 0

Forum statistics

Threads
1,215,734
Messages
6,126,542
Members
449,316
Latest member
sravya

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