ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF Function with ISBLANK (https://www.excelbanter.com/excel-worksheet-functions/186588-if-function-isblank.html)

Steve M[_3_]

IF Function with ISBLANK
 
Hello,
I'm hoping someone can figure this out. I am trying to add a value to
B1 using the following:
I started out with =IF(ISBLANK(A1),"",8)
A1 will either be blank or contain a date. As an example I want to
change the above so that if I enter in A1 the date of May-7x the the
value in B1 will return a 4. And if I enter the date of May-7z into
A1 then the value returned in B1 should be 8.

So to summarize, B1 should either be blank, contain a 4 or contain an
8. I think the key is that I need to define a wild card (if possible)
to look for either the 'x' at the end of the date to bring back '4' or
a 'z' at the end of the date to bring back an '8'.

Its a bit confusing to explain, hopefully you can understand.

-Thanks

AKphidelt

IF Function with ISBLANK
 
Try something like this

=If(Len(A1)<1,"",If(Right(A1,1)="x",4,If(Right(A1, 1)="z",8,"Error")))

"Steve M" wrote:

Hello,
I'm hoping someone can figure this out. I am trying to add a value to
B1 using the following:
I started out with =IF(ISBLANK(A1),"",8)
A1 will either be blank or contain a date. As an example I want to
change the above so that if I enter in A1 the date of May-7x the the
value in B1 will return a 4. And if I enter the date of May-7z into
A1 then the value returned in B1 should be 8.

So to summarize, B1 should either be blank, contain a 4 or contain an
8. I think the key is that I need to define a wild card (if possible)
to look for either the 'x' at the end of the date to bring back '4' or
a 'z' at the end of the date to bring back an '8'.

Its a bit confusing to explain, hopefully you can understand.

-Thanks


T. Valko

IF Function with ISBLANK
 
I think the key is that I need to define a wild card (if possible)
to look for either the 'x' at the end of the date to bring back
'4' or a 'z' at the end of the date to bring back an '8'.


Yes, that's exactly what you need to do. Are "x" and "z" genreric
placeholders or do you want to look for literal "x" or "z" ?

If they're generic placeholders then they need to be defined somehow.


--
Biff
Microsoft Excel MVP


"Steve M" wrote in message
...
Hello,
I'm hoping someone can figure this out. I am trying to add a value to
B1 using the following:
I started out with =IF(ISBLANK(A1),"",8)
A1 will either be blank or contain a date. As an example I want to
change the above so that if I enter in A1 the date of May-7x the the
value in B1 will return a 4. And if I enter the date of May-7z into
A1 then the value returned in B1 should be 8.

So to summarize, B1 should either be blank, contain a 4 or contain an
8. I think the key is that I need to define a wild card (if possible)
to look for either the 'x' at the end of the date to bring back '4' or
a 'z' at the end of the date to bring back an '8'.

Its a bit confusing to explain, hopefully you can understand.

-Thanks




Steve M[_3_]

IF Function with ISBLANK
 
Biff,
"x" or "z" are literal. I figured I needed to define a consistent
value to check for. I'm not sure how to use the wild card so I could
use some help on that.

-Thanks


On May 7, 4:12 pm, "T. Valko" wrote:
I think the key is that I need to define a wild card (if possible)
to look for either the 'x' at the end of the date to bring back
'4' or a 'z' at the end of the date to bring back an '8'.


Yes, that's exactly what you need to do. Are "x" and "z" genreric
placeholders or do you want to look for literal "x" or "z" ?

If they're generic placeholders then they need to be defined somehow.

--
Biff
Microsoft Excel MVP







Steve M[_3_]

IF Function with ISBLANK
 
Thanks akphidelt, that one works. I suppose I was way off. Thanks
again.


On May 7, 4:12 pm, akphidelt
wrote:
Try something like this

=If(Len(A1)<1,"",If(Right(A1,1)="x",4,If(Right(A1, 1)="z",8,"Error")))

"Steve M" wrote:
Hello,
I'm hoping someone can figure this out. I am trying to add a value to
B1 using the following:
I started out with =IF(ISBLANK(A1),"",8)
A1 will either be blank or contain a date. As an example I want to
change the above so that if I enter in A1 the date of May-7x the the
value in B1 will return a 4. And if I enter the date of May-7z into
A1 then the value returned in B1 should be 8.


So to summarize, B1 should either be blank, contain a 4 or contain an
8. I think the key is that I need to define a wild card (if possible)
to look for either the 'x' at the end of the date to bring back '4' or
a 'z' at the end of the date to bring back an '8'.


Its a bit confusing to explain, hopefully you can understand.


-Thanks



Steve M[_3_]

IF Function with ISBLANK
 
Is it possible to modify this so that if I enter the date with an x it
will return a value of 4 and if I enter just the date alone it will
return a value of 8? The 8 will be the most used value so if I could
have it so that I can use the x as a 'switch' to change the value to 8
then this would work best. I would still need the default to be
blank.

-thanks again





On May 7, 4:32 pm, Steve M wrote:
Thanks akphidelt, that one works. I suppose I was way off. Thanks
again.

On May 7, 4:12 pm, akphidelt
wrote:

Try something like this


=If(Len(A1)<1,"",If(Right(A1,1)="x",4,If(Right(A1, 1)="z",8,"Error")))


"Steve M" wrote:
Hello,
I'm hoping someone can figure this out. I am trying to add a value to
B1 using the following:
I started out with =IF(ISBLANK(A1),"",8)
A1 will either be blank or contain a date. As an example I want to
change the above so that if I enter in A1 the date of May-7x the the
value in B1 will return a 4. And if I enter the date of May-7z into
A1 then the value returned in B1 should be 8.


So to summarize, B1 should either be blank, contain a 4 or contain an
8. I think the key is that I need to define a wild card (if possible)
to look for either the 'x' at the end of the date to bring back '4' or
a 'z' at the end of the date to bring back an '8'.


Its a bit confusing to explain, hopefully you can understand.


-Thanks



AKphidelt

IF Function with ISBLANK
 
no problem, if you have any more information on what exactly you want to do
let me know. In case this doesn't solve all your problems for this particular
situation.

"Steve M" wrote:

Thanks akphidelt, that one works. I suppose I was way off. Thanks
again.


On May 7, 4:12 pm, akphidelt
wrote:
Try something like this

=If(Len(A1)<1,"",If(Right(A1,1)="x",4,If(Right(A1, 1)="z",8,"Error")))

"Steve M" wrote:
Hello,
I'm hoping someone can figure this out. I am trying to add a value to
B1 using the following:
I started out with =IF(ISBLANK(A1),"",8)
A1 will either be blank or contain a date. As an example I want to
change the above so that if I enter in A1 the date of May-7x the the
value in B1 will return a 4. And if I enter the date of May-7z into
A1 then the value returned in B1 should be 8.


So to summarize, B1 should either be blank, contain a 4 or contain an
8. I think the key is that I need to define a wild card (if possible)
to look for either the 'x' at the end of the date to bring back '4' or
a 'z' at the end of the date to bring back an '8'.


Its a bit confusing to explain, hopefully you can understand.


-Thanks




T. Valko

IF Function with ISBLANK
 
I see 'akphidelt' addressed the literal values.

--
Biff
Microsoft Excel MVP


"Steve M" wrote in message
...
Biff,
"x" or "z" are literal. I figured I needed to define a consistent
value to check for. I'm not sure how to use the wild card so I could
use some help on that.

-Thanks


On May 7, 4:12 pm, "T. Valko" wrote:
I think the key is that I need to define a wild card (if possible)
to look for either the 'x' at the end of the date to bring back
'4' or a 'z' at the end of the date to bring back an '8'.


Yes, that's exactly what you need to do. Are "x" and "z" genreric
placeholders or do you want to look for literal "x" or "z" ?

If they're generic placeholders then they need to be defined somehow.

--
Biff
Microsoft Excel MVP









Steve M[_3_]

IF Function with ISBLANK
 
On May 7, 4:42 pm, "T. Valko" wrote:
I see 'akphidelt' addressed the literal values.

--
Biff
Microsoft Excel MVP

"Steve M" wrote in message

...

Biff,
"x" or "z" are literal. I figured I needed to define a consistent
value to check for. I'm not sure how to use the wild card so I could
use some help on that.


-Thanks


On May 7, 4:12 pm, "T. Valko" wrote:
I think the key is that I need to define a wild card (if possible)
to look for either the 'x' at the end of the date to bring back
'4' or a 'z' at the end of the date to bring back an '8'.


Yes, that's exactly what you need to do. Are "x" and "z" genreric
placeholders or do you want to look for literal "x" or "z" ?


If they're generic placeholders then they need to be defined somehow.


--
Biff
Microsoft Excel MVP


Yes, and thanks again for your response.

AKphidelt

IF Function with ISBLANK
 
Yea, if you have three possible options, 4, 8, and "" then you can set it up
like

=If(Len(A1)<1,"",If(Right(A1,1)="x",4,8))

So this says, hey if there is nothing in the cell, leave it blank... if
there is an x in a cell with something in it, make it 4... if there is
something in a cell with no x then make it 8.

"Steve M" wrote:

Is it possible to modify this so that if I enter the date with an x it
will return a value of 4 and if I enter just the date alone it will
return a value of 8? The 8 will be the most used value so if I could
have it so that I can use the x as a 'switch' to change the value to 8
then this would work best. I would still need the default to be
blank.

-thanks again





On May 7, 4:32 pm, Steve M wrote:
Thanks akphidelt, that one works. I suppose I was way off. Thanks
again.

On May 7, 4:12 pm, akphidelt
wrote:

Try something like this


=If(Len(A1)<1,"",If(Right(A1,1)="x",4,If(Right(A1, 1)="z",8,"Error")))


"Steve M" wrote:
Hello,
I'm hoping someone can figure this out. I am trying to add a value to
B1 using the following:
I started out with =IF(ISBLANK(A1),"",8)
A1 will either be blank or contain a date. As an example I want to
change the above so that if I enter in A1 the date of May-7x the the
value in B1 will return a 4. And if I enter the date of May-7z into
A1 then the value returned in B1 should be 8.


So to summarize, B1 should either be blank, contain a 4 or contain an
8. I think the key is that I need to define a wild card (if possible)
to look for either the 'x' at the end of the date to bring back '4' or
a 'z' at the end of the date to bring back an '8'.


Its a bit confusing to explain, hopefully you can understand.


-Thanks




Steve M[_3_]

IF Function with ISBLANK
 
On May 7, 5:12 pm, akphidelt
wrote:
Yea, if you have three possible options, 4, 8, and "" then you can set it up
like

=If(Len(A1)<1,"",If(Right(A1,1)="x",4,8))

So this says, hey if there is nothing in the cell, leave it blank... if
there is an x in a cell with something in it, make it 4... if there is
something in a cell with no x then make it 8.

"Steve M" wrote:
Is it possible to modify this so that if I enter the date with an x it
will return a value of 4 and if I enter just the date alone it will
return a value of 8? The 8 will be the most used value so if I could
have it so that I can use the x as a 'switch' to change the value to 8
then this would work best. I would still need the default to be
blank.


-thanks again


On May 7, 4:32 pm, Steve M wrote:
Thanks akphidelt, that one works. I suppose I was way off. Thanks
again.


On May 7, 4:12 pm, akphidelt
wrote:


Try something like this


=If(Len(A1)<1,"",If(Right(A1,1)="x",4,If(Right(A1, 1)="z",8,"Error")))


"Steve M" wrote:
Hello,
I'm hoping someone can figure this out. I am trying to add a value to
B1 using the following:
I started out with =IF(ISBLANK(A1),"",8)
A1 will either be blank or contain a date. As an example I want to
change the above so that if I enter in A1 the date of May-7x the the
value in B1 will return a 4. And if I enter the date of May-7z into
A1 then the value returned in B1 should be 8.


So to summarize, B1 should either be blank, contain a 4 or contain an
8. I think the key is that I need to define a wild card (if possible)
to look for either the 'x' at the end of the date to bring back '4' or
a 'z' at the end of the date to bring back an '8'.


Its a bit confusing to explain, hopefully you can understand.


-Thanks


That is absolutely perfect. Thank you so much.


All times are GMT +1. The time now is 02:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com