Help with IF formula?

socals

New Member
Joined
Sep 7, 2013
Messages
19
Hello All, I am trying to figure out a formula that will calculate if there's a number in an adjacent cell and if not, display nothing but I don't think I'm searching for the right thing because I can't seem to find what I need.

In cell A1, I have a number that displays inches. In cell B1, I have a formula that converts it to feet and inches (=INT(A1/12)&"' "&MOD(A1,12)&""""). What happens is it shows 0'0" when there isn't data but I would rather it be blank. My Google searches led me to IF statements but I haven't seen anything that shows what I'm looking for so I may be looking at the wrong thing.

Thank you in advance for your help.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
60,782
Office Version
  1. 365
Platform
  1. Windows
Try this:
Excel Formula:
=IF(A1="","",INT(A1/12)&"' "&MOD(A1,12)&""""))
What it essentially says is if A1 is nothing, return nothing. Otherwise, return your calculation.
 
Solution

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
67,892
Office Version
  1. 365
Platform
  1. Windows
How about
Excel Formula:
=IF(A1="","",INT(A1/12)&"' "&MOD(A1,12)&"""")
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
67,892
Office Version
  1. 365
Platform
  1. Windows
Glad we could help & thanks for the feedback.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
60,782
Office Version
  1. 365
Platform
  1. Windows
You are welcome.
Glad we could help!
 
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,700
Messages
5,766,007
Members
425,322
Latest member
galaxy6623top

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