If = do nothing

Phil Payne

Board Regular
Joined
May 17, 2013
Messages
131
Office Version
  1. 365
Platform
  1. Windows
Hello all,

Is there a way to set up an ‘IF’ formula that when condition is not satisfied the result is ‘do nothing’? (it doesn't have to be IF but it does need to be an in-cell formula)

Normally you would have something like - =IF(A3=3,"Yes","No") - obviously this basically means whatever the value of A3, you have to do something i.e. respond with “Yes” or “No”.

Is there a way to get it to do nothing when the condition is not met?


e.g. =IF(A3=3,[Do Something],[Do Nothing])

Thanks,

Phil




 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi Phil

You just put double quotes if the condition is FALSE like this:
=IF(A3=3,"Yes","")
 
Upvote 0
Hi Phil

You just put double quotes if the condition is FALSE like this:
=IF(A3=3,"Yes","")

Thanks for the quick response Vidar,

Say the previously it was "Yes", when A3 next changes and does not equal 3 the cell is emptied (i.e. it does something). I do not want the cell to go to empty or anything else after a "yes" has been given. Yes should remain.

Thanks,
 
Upvote 0
How about this?
=IF(A3=3,A3+5,A3)

if A3=3 then [do something(add 5 to A3)] otherwise [do nothing(return value of A3)]
 
Upvote 0
Hello all,

Is there a way to set up an ‘IF’ formula that when condition is not satisfied the result is ‘do nothing’?

Hi,

As far as I understand, if you enter plain number 17 in the cell, it satisfies your requirement, because, no matter what happens, it does nothing. To be honest, if you leave the cell empty, it will also satisfy your requirement.

More seriously:

1) Enable iterative calculations;
2) make A1 empty;
3) enter =IF(ISBLANK(A1),MAX(0,B1),MAX(1,B1)) in cell B2.

Initially B1 is 0. Now, if you enter whatever value in A1, B2 becomes 1 and since then, no matter what you do subsequently in A1, remains 1.

J.Ty.
 
Upvote 0
How about this?
=IF(A3=3,A3+5,A3)

if A3=3 then [do something(add 5 to A3)] otherwise [do nothing(return value of A3)]

Hello Jim,

Unfortunately this does not work.

Hopefully this will better explain the 'do something' 'do nothing' idea:

The A3 value can be anything but when it equals 3 it enters a value in another cell (do something). If A3 value changes from 3 I do not want the value in the other cell to change ( do nothing).

Thanks
 
Upvote 0
It will take VBA to do what you are asking. What cell needs to change if A3 changes to 3?
 
Upvote 0
It will take VBA to do what you are asking. What cell needs to change if A3 changes to 3?

^^^ What he wrote!

Any formula will always calculate on live data. VBA is the only way to go if you want the cell to be a "one-time-use"
 
Upvote 0
It will take VBA to do what you are asking. What cell needs to change if A3 changes to 3?

Thanks Scott,

I believe you are correct and I'm already looking down that road. However I needed to ask to make sure I hadn't missed a simpler way.

This involves status codes (1 to 11) and the recording and retention of the date when a particular status was achieved!

Regards.

Phil
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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