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
Matt PinkstonEnterprise ArchitectAsked:
Who is Participating?
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.

Karthik RamachandranCommented:
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.
0
Rgonzo1971Commented:
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"})))

Open in new window

Regards
0
Matt PinkstonEnterprise 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
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Rgonzo1971Commented:
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"})))

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

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

Start your 7-day free trial
crystal (strive4peace) - Microsoft MVP, AccessRemote 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
0
Martin LissOlder than dirtCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.