A Proper IF Statement?

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,538
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Is this valid "IF" statement?

Code:
If .Range("H" & rnum1) = "RIM Park Outdoor Facilities" And .Range("BB" & rnum1) <> "N*" Then

I'm not sure ifyou can use 'ADD"' and if you can, if you can use a wildcard "*" in the criteria.

It's not showing the results anticipated.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
It is valid but it probably won't work properly as you can't use wildcards.

If you want to check that the first character of column BB is not equal to "N" you can use Left.
Code:
If .Range("H" & rnum1) = "RIM Park Outdoor Facilities" And Left(.Range("BB" & rnum1),1) <> "N" Then
 
Upvote 0
Thanks Norie ... I should have known better.
 
Upvote 0

Forum statistics

Threads
1,203,201
Messages
6,054,088
Members
444,702
Latest member
patrickmg17

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