IF then DO NOTHING

FoFJeremy

New Member
Joined
Oct 4, 2005
Messages
23
Hello

Does anybody know a way to create an IF fuction that basically says that if the logical test is false, leave the value that was in the cell alone?

I have a sheet that runs a number of calucations and I want to be able to output the results to one of 3 areas chosen by a in cell dropdown. Right now when I change the selection in the dropdown it turns the output from the previous set of caclulations to false.

I hope that this is clear and thanks for the help
 

Some videos you may like

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

MNpoker

Board Regular
Joined
Dec 15, 2003
Messages
154
Not sure I'm following.

Is the old formula the same?

Could you show the IF statement and explain what is changing (or not)
 

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
Hmm, maybe ..

=IF(test_condition,if_true,cell)

.. unless of course you are talking about trying to put a formula into a cell and return the same cell's previous value upon FALSE determination. That would create a circular reference which isn't what you want.
 

FoFJeremy

New Member
Joined
Oct 4, 2005
Messages
23
That is exactly the case; I'm trying to return the previous value as the False case, obviously without creating some type of circular reference.

any way to accomplish this?
 

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
Hi Jeremy,

I apologize for not seeing this sooner. Let's keep all related info away from pm's and on the board for everybody's benefit.

I would recommend you not use Circular Reference for this case. Excel has thousands and thousands of cells, plenty for us to use. Generally and usually, I'm of the opinion that Data should be entered seperately from anything formulated, i.e. reports, queries, etc.
 

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
Use code, something like

Public PreVal As Variant
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
PreVal = Target.Value
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Value > PreVal Then
Exit Sub
Else
Target.Value = PreVal
End If
End Sub

This goes in the WorkSheet module

lenze
 

Watch MrExcel Video

Forum statistics

Threads
1,122,850
Messages
5,598,441
Members
414,240
Latest member
xnanx

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
Top