Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula problem

Status
Not open for further replies.

SBuzzT

Programmer
Aug 24, 2005
86
CA
The formula below tells excel to assign a value of PRO to anything with the value H-Nov-030-01.

How would I get the formula below to search for anything like H-(whatever)-(value less than 5)-(whatever)?

Code:
=IF(OR(A3="H-Nov-030-01"),"PRO",IF(A3="ZFC","COM","PGR"))
 

Hi,

IF the format is ALWAYS
[tt]
H-xxx-nnn-nn
[/tt]
where xxx is any text value and nnn and nn are numeric values, then test
[tt]
Left(A1,2)="H-"
VALUE(MID(A1,7,3))<5
[/tt]

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
I'm not sure how that whole formula is now supposed to look (I'm no excel expert, for sure). Could you show me the entire formula?
 
[tt]
=if(and(Left(A1,2)="H-",VALUE(MID(A1,7,3))<5),"PRO",.....)
[/tt]


Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
From
Code:
=IF(AND(LEFT(A1,2)="H-",VALUE(MID(A1,7,3))<5),"PRO",IF(A3="ZFC","COM","PGR"))

I get #VALUE! as a result now. The value I'm comparing against (trying to get a PRO result) is H-Nov-000-01.
 
Do you mean to go from A1 to A3 in your referenced cells?


[tt]_____
[blue]-John[/blue]
[/tt][red]Quidquid latine dictum sit, altum viditur[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top