Macro to show cell result

Juan C

Board Regular
Joined
Mar 6, 2009
Messages
131
Hello all...

I have the following problem :(:

I need a macro that displays on cell D3 the result of cell B3, every time cell B3 changes from 0 to a non 0 number.
To clarify: if cell B3 changes from 0 to xxx, then cell D3 will show xxx and remains with the same result unless cell B3 goes back to 0. Then when cell B3 changes again from 0 to yyy, then D3 will show yyy.

Could somebody help me with this macro?

Thanks

JC
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
You don't need a macro for that...
Try a formula in D3

=IF(B3=0,"",B3)


Hope that helps.
 
Upvote 0
Thanks Jonmo1

Your formula won't work, because if B3 changes the result lets say, from 4 to 5, then it will display 5. The macro must only show the first value after B3 changes from 0 to a value.

Thanks....;)

JC
 
Upvote 0
Ahh, OK

Will only numbers be entered in B3?
Or is it actually necessary to test the new value to be a number?
 
Upvote 0
OK, we're going to need to trace the formula in B3 back to the cells that cause it's value to change...

What is the formula in B3..


Basically, which cells cause the result of the formula in B3 to change?
 
Upvote 0
the value of the result in the cell above to know whether you have changed values from a previous blank (zero in B) or not then use the previously value that changed until b=0

if it's not working maybe you should post an example of your spreadsheet
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,153
Members
452,891
Latest member
JUSTOUTOFMYREACH

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