Help with Excel Formula

I have the following excel formula

=IF(OR(LEFT(C2,3)="CS-",LEFT(C2,4)="CS -"),"Consulting & Intelligence",LOOKUP(9.9999E+307,SEARCH({"Civilian","ES USPS CONSULTING SERVICES AND INTEL","Defense","Navy","Healthcare","Sled"},M2),{"Civilian","USPS Intel","Defense/Fedsec","Navy/USMC","Healthcare","S&L"}))

Couple questions...

1. what is the purpose of LOOKUP(9.9999E+307
2. also I need to add a check that would also look in column Q and any time the value USPSF016741 is found the the return should be Intel
Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
1. In Excel help under Microsoft Excel Specifications, Largest allowed positive number is 9.99999999999999E307

So, if you are trying to find the largest value, it can not be any greater than 9.99999999999999E307.

You can use this to determine the end of a numeric range of data.
Commented:
HI,

pls try

``````=IF(Q2="USPSF016741";"Intel";IF(OR(LEFT(C2,3)="CS-",LEFT(C2,4)="CS -"),"Consulting & Intelligence",LOOKUP(9.9999E+307,SEARCH({"Civilian","ES USPS CONSULTING SERVICES AND INTEL","Defense","Navy","Healthcare","Sled"},M2),{"Civilian","USPS Intel","Defense/Fedsec","Navy/USMC","Healthcare","S&L"})))
``````
Regards
Enterprise ArchitectAuthor Commented:
This formula

=IF(Q2="USPSF016741";"Intel";IF(OR(LEFT(C2,3)="CS-",LEFT(C2,4)="CS -"),"Consulting & Intelligence",LOOKUP(9.9999E+307,SEARCH({"Civilian","ES USPS CONSULTING SERVICES AND INTEL","Defense","Navy","Healthcare","Sled"},M2),{"Civilian","USPS Intel","Defense/Fedsec","Navy/USMC","Healthcare","S&L"})))

gets an error
Commented:
Sorry
``````=IF(Q2="USPSF016741","Intel",IF(OR(LEFT(C2,3)="CS-",LEFT(C2,4)="CS -"),"Consulting & Intelligence",LOOKUP(9.9999E+307,SEARCH({"Civilian","ES USPS CONSULTING SERVICES AND INTEL","Defense","Navy","Healthcare","Sled"},M2),{"Civilian","USPS Intel","Defense/Fedsec","Navy/USMC","Healthcare","S&L"})))
``````

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Remote Training and ProgrammingCommented:
1. what is the purpose of LOOKUP(9.9999E+307

The purpose of LOOKUP is to lookup a value and return another value in the same position.

It's purpose might have been to convert "ES USPS CONSULTING SERVICES AND INTEL" to "USPS Intel".  The example looks wrong to me, however

LOOKUP(lookup_value, lookup_range, [result_range])

The lookup range can be a row and the result range be a column, so it has flexibility.  It can also use an array

LOOKUP(lookup_value, array)

When using an array, there is a semi-colon separating the lookup values from the result values, and they are part of the same array.

Data needs to be sorted in ascending order.

VLOOKUP and HLOOKUP are improved versions of LOOKUP
Older than dirtCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.