IF statement not doing anything if condition met

Hapdawg88

New Member
Joined
Dec 28, 2016
Messages
11
=IF($DF2=5,"5/6", IF($DF2=6,"5/6",$DF2))

I have put this formula in column DG. I would like for it to change all of the 5's and 6's in column DF to 5/6 and the leave the other values as they are . Currently, it is leaving all of the values as they are - not changing 5 and 6 to 5/6.

Any idea what I am doing wrong?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi,
Check if the DF column has number stored as text, Put in column DH =ISNUMBER(DG2). Your formula is working for me.
 
Upvote 0
You can simplify that formula like
=IF(OR(DF2={5,6}),"5/6",DF2)
However as Aryatect said you need to check if the values in DF are text or numbers.
You also need to check that they are exactly 5 or 6, rather than 5.1 which are set to display as 5
 
Upvote 0
The values in DF are numbers and 'NA'. I highlighted the column and formatted cells as numbers but it did not help.




You can simplify that formula like
=IF(OR(DF2={5,6}),"5/6",DF2)
However as Aryatect said you need to check if the values in DF are text or numbers.
You also need to check that they are exactly 5 or 6, rather than 5.1 which are set to display as 5
 
Upvote 0

Forum statistics

Threads
1,223,703
Messages
6,173,973
Members
452,540
Latest member
haasro02

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