Retrieve last non blank value in a list

Tornado1981

Board Regular
Joined
Apr 1, 2010
Messages
248
111jbp.jpg


Hi,
I would really appreciate if u help me on solving this
I want a formula in each cell in column C to do this :
(Taking C5 as an example)
Test if there is a value in A5 .. if not found, then leave C5 blank .. else, test if there is a value in ($C$1:C4) .. and if found, then add the last value found in ($C$1:C4) to A5 and subtract B5 from the result .. else [ no values found in ($C$1:C4) ], then subtract B5 from A5

Thank u so much

Note : I used the offset function to retrieve the last non blank value in ($C$1:C8)
 
321zf.jpg


Dear Aladin,
Another problem here :)
When I enter a value in B12 and C12&D12 are blank, E12 stills the same as E11, while i want it to be E11+C12+D12-B12
Any suggestions ?
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
321zf.jpg


Dear Aladin,
Another problem here :)
When I enter a value in B12 and C12&D12 are blank, E12 stills the same as E11, while i want it to be E11+C12+D12-B12
Any suggestions ?

E3, just enter and copy down:
Code:
=IF(MATCH(BigNum,$A$3:$A$12)>=ROWS($D$3:D3),
   IF(OR(ISNUMBER(LOOKUP(BigNum,$E$2:E2)),N(D3)),
    SUM(LOOKUP(BigNum,CHOOSE({1,2},0,
      LOOKUP(BigNum,$E$2:E2))),C3,D3,-B3),""),"")

The rule has become:If a figure is available in E[i-1] or D, proceed to sum E[i-1],C,D,and -B.
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,813
Members
452,945
Latest member
Bib195

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