Lookup or If/Find

DIE_ARD

New Member
Joined
Nov 9, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
HI All,
First post in many years. please be gentle.
Im not sure the correct solution for this one, ideally, I need to do this without having to use a lookup table as doing it in Power Query and cant work out the formula for it.

Please see data set (Col D), this can be up to 160k rows
Anything beginning with C in the data col I want to show as Corporate
Anything beginning with T in the data col I want to show as Technical
Anything that shows as 00098 I want to show as Cab1
Etc etc as per the lookup table on the left.
Any suggestions would be gratefully received.

1667988656066.png


Thanks.

Paul.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
using only the given lookup values, the below formula could work
--------------
Book1
DE
2dataresult
399Cab2
498Cab1
5c12345corporate
6m1234unknown
7m3456unknown
8c0598corporate
9r9968shop
10c1237corporate
11c98787corporate
Sheet1
Cell Formulas
RangeFormula
E3:E11E3=IFS(ISNUMBER(D3),IF(D3=99,"Cab2","Cab1"),LEFT(D3,1)="c","corporate",LEFT(D3,1)="t","technical",LEFT(D3,1)="m","unknown",LEFT(D3,1)="r","shop")
 
Upvote 0
Solution
using only the given lookup values, the below formula could work
--------------
Book1
DE
2dataresult
399Cab2
498Cab1
5c12345corporate
6m1234unknown
7m3456unknown
8c0598corporate
9r9968shop
10c1237corporate
11c98787corporate
Sheet1
Cell Formulas
RangeFormula
E3:E11E3=IFS(ISNUMBER(D3),IF(D3=99,"Cab2","Cab1"),LEFT(D3,1)="c","corporate",LEFT(D3,1)="t","technical",LEFT(D3,1)="m","unknown",LEFT(D3,1)="r","shop")
Hi
Thanks very much that, it worked perfect.
I can add lookup values to the formula as I go on.
Thanks for taking the time to look at this and replying, I really appreciate it.
 
Upvote 0
glad to help. please consider marking it as solution if it is fact a solution for your post.
 
Upvote 0
Thanks very much that, it worked perfect.
The marked solution post has been switched to the actual answer to the question.

@DIE_ARD: In your future questions, please mark the post as the solution that answered your question to help future readers. No further action is required in this thread.
 
Upvote 0

Forum statistics

Threads
1,223,516
Messages
6,172,778
Members
452,477
Latest member
DigDug2024

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top