If formula not working right

zone709

Well-known Member
Joined
Mar 1, 2016
Messages
2,079
Office Version
  1. 365
Platform
  1. Windows
Hi trying to get this to work, but returns nothing blank. What am I missing? If name is present return that number ,1 ,2 or ,3

=IF(R2="Yard",1,IF(R2="Yards",2,IF(R2="Tunnel",3,"")))
 
Hi,

Personally, I'd go with the formula setup as suggested by Scott in Post # 9.

But just fixing your IF statement, you have """" at the end, change that to ""
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi ok i just tried scotts maybe ill use this thanks. Also the "" works now thanks for the reply
 
Upvote 0
You're welcome, in case you need this:

=IFERROR(MATCH(TRIM(R2),{"Yard","Yards","Tunnel","River"},0),"")
 
Upvote 0

Forum statistics

Threads
1,215,083
Messages
6,123,020
Members
449,092
Latest member
ikke

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