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)
 
444io.jpg


This was the result
Again, Cells I9 and I10 are blank while they should contain the same value as I8 (3) since G9 and G10 have no values.

Oops...

Code:
=IF(MATCH(BigNum,$G$6:$G$13)>=ROWS($G$6:G7),
    IF(ISNUMBER(LOOKUP(BigNum,$G$6:G7)),
     SUM(LOOKUP(BigNum,CHOOSE({1,2},0,LOOKUP(BigNum,$I$6:I6))),
       G7,-H7),""),"")
 
Upvote 0

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
111hpq.jpg


Dear Aladin,
I need ur help in solving this problem please
If i add a a value in a fixed cell (H4) and want this value to be added to just the first value that appears in column I (which depend on the corresponding value in column G as u know)

Thank u
 
Upvote 0
111hpq.jpg


Dear Aladin,
I need ur help in solving this problem please
If i add a a value in a fixed cell (H4) and want this value to be added to just the first value that appears in column I (which depend on the corresponding value in column G as u know)

Thank u

is this what you mean...
Code:
=IF(MATCH(BigNum,$G$6:$G$13)>=ROWS($G$6:G7),
    IF(ISNUMBER(LOOKUP(BigNum,$G$6:G7)),
    SUM((MIN(IF(ISNUMBER($G$7:$G$13),
    ROW($G$7:$G$13)))=ROW())*$H$4,
    LOOKUP(BigNum,CHOOSE({1,2},0,
    LOOKUP(BigNum,$I$6:I6))),G7,-H7),""),"")
which must be confirmed with control+shift+enter?
 
Upvote 0
222ni.jpg


Dear Aladin,
Now i,ve inserted three new columns to my old table (the one to the right)
The three new columns are dependant on just the blue column (Rental balance before)
What i want to do is (if my range is (A3:F12)) :
1) If cell Dx is blank then leave Ex blank
2) If cell Dx have numeric values, then show in cell Ex the result of (Cx+Dx-Bx)
3) If cell Dx is blank and cell E(x-1) (i.e the former cell) contains a value, then show in cell Ex the same value in E(x-1)

So, what would be the formula to use in column E

Can u help me plz ? :)
 
Upvote 0
222ni.jpg


Dear Aladin,
Now i,ve inserted three new columns to my old table (the one to the right)
The three new columns are dependant on just the blue column (Rental balance before)
What i want to do is (if my range is (A3:F12)) :
1) If cell Dx is blank then leave Ex blank
2) If cell Dx have numeric values, then show in cell Ex the result of (Cx+Dx-Bx)
3) If cell Dx is blank and cell E(x-1) (i.e the former cell) contains a value, then show in cell Ex the same value in E(x-1)

So, what would be the formula to use in column E

Can u help me plz ? :)

Try...

E3, just enter and copy down:

=IF(D3="",IF(ISNUMBER(LOOKUP(BigNum,$E$2:E2)),E2,""),SUM(C3,D3,-B3))
 
Upvote 0
123be.jpg


That is what i got .. it's perfect
But is there a way to make E12 blank since A12 is blank too ?
Also the value in cell E10 must be 2 (E9+D10+C10-B10)
Sorry, i didn't mention that before
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

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