Wildcards in a nested IF

KellisR

New Member
Joined
Feb 24, 2002
Messages
11
Here is the formula:
=IF(Q2="Scheduled",Q2,IF(Q2="NON-IET GRAD (SCHED)",Q2,IF(X2="*",X2,IF
(X2<>"*",B2)))) I don't have the 3rd claus written correctly, as
there is data (text) in X2 but the formula is returning cell B2
contents. Suggestions? Column X has many different "comments" so I
need to use the wildcard. Thanks in advance, this one has me
stumpted. Ron
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
On 2002-02-25 13:24, KellisR wrote:
Here is the formula:
=IF(Q2="Scheduled",Q2,IF(Q2="NON-IET GRAD (SCHED)",Q2,IF(X2="*",X2,IF
(X2<>"*",B2)))) I don't have the 3rd claus written correctly, as
there is data (text) in X2 but the formula is returning cell B2
contents. Suggestions? Column X has many different "comments" so I
need to use the wildcard. Thanks in advance, this one has me
stumpted. Ron

Ron,

Try:

=IF(Q2="Scheduled",Q2,IF(Q2="NON-IET GRAD (SCHED)",Q2,IF(LEN(X2),X2,B2)))

Aladin
 
Upvote 0
Aladin, I tried to reply that it did not work, but I think I found the reason...

=IF(Q2="Scheduled",Q2,IF(Q2="NON-IET GRAD (SCHED)",Q2,IF(LEN(X2)>0,X2,B2)))

rather then

=IF(Q2="Scheduled",Q2,IF(Q2="NON-IET GRAD (SCHED)",Q2,IF(LEN(X2),X2,B2)))

Thanks for pointing me in the right direction.
 
Upvote 0
On 2002-02-26 14:14, KellisR wrote:
Aladin, I tried to reply that it did not work, but I think I found the reason...

=IF(Q2="Scheduled",Q2,IF(Q2="NON-IET GRAD (SCHED)",Q2,IF(LEN(X2)>0,X2,B2)))

rather then

=IF(Q2="Scheduled",Q2,IF(Q2="NON-IET GRAD (SCHED)",Q2,IF(LEN(X2),X2,B2)))

Thanks for pointing me in the right direction.

Ron: They should behave alike...
 
Upvote 0
Hi Aladin

Many times i see you add +0 or +1 on the end of complex formula and it makes all the difference, why does +0 make the formula work and without if fails.. puzzle me for many months.

Like multpy by + to get text to value works fine but ODD!
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

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