Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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. |
#10
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#11
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error with ISBLANK function | Excel Discussion (Misc queries) | |||
ISBLANK FUNCTION | Excel Worksheet Functions | |||
ISBLANK function??? | Excel Worksheet Functions | |||
ISBLANK() function | New Users to Excel | |||
isblank function | Excel Worksheet Functions |