Fetch Alphabets in front of codes.

parankush

New Member
Joined
Jun 11, 2020
Messages
36
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
  6. 2011
  7. 2010
  8. 2007
  9. 2003 or older
Platform
  1. Windows
  2. MacOS
  3. Mobile
  4. Web
I want the Alphabets in front of the Product Code according to the range they belong. Tried Vlookup and IF formula but it wont help.






Book2
ABCDE
1Product CodeAlphabetsRangeAlphabets
21000010000-10999A
31000111000-11999B
41000212000-12999C
51000313000-13999D
610004
710005
810006
910007
1010008
1110009
1210010
1310011
1410012
1510013
1611000
1711001
1811002
1911003
2011004
2111005
2212000
2312202
2413203
2514000
2612503
2713504
2812504
2910005
Sheet1
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
How about
+Fluff 1.xlsm
ABCDE
1Product CodeAlphabetsRangeAlphabets
29999 10000A
310001A11000B
410002A12000C
510003A13000D
610004A14000
710005A
810006A
910007A
1010008A
1110009A
1210010A
1310011A
1410012A
1510013A
1611000B
1711001B
1811002B
1911003B
2011004B
2111005B
2212000C
2312202C
2413203D
2514000 
2612503C
2713504D
2812504C
2910005A
Result
Cell Formulas
RangeFormula
B2:B29B2=IFERROR(T(INDEX($E$2:$E$6,MATCH(A2,$D$2:$D$6,1))),"")
 
Upvote 0
Solution
Here is another formula that you can try...
Excel Formula:
=LOOKUP(A2/1000,{0,10,11,12,13,14},{"","A","B","C","D",""})
 
Upvote 0
Here is another formula that you can try...
Excel Formula:
=LOOKUP(A2/1000,{0,10,11,12,13,14},{"","A","B","C","D",""})
And here is one more...
Excel Formula:
=MID("ABCD",1+MOD(MAX(9999,A2)/1000,10),1)
 
Last edited:
Upvote 0
Thank You everyone for all the replies.
All the formulas are working and will help me in getting the required result.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,746
Messages
6,126,641
Members
449,325
Latest member
Hardey6ix

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