If formula for 'Begins with' text

hurricanedaphne

New Member
Joined
Nov 9, 2010
Messages
8
I have a spreadsheet with over 50k rows of data that I need to assign to 6 different individuals based alphabetically on customer name. Currently I text-to-columns on the customer name to separate the first letter (assume to column B). My formula I use at that point is:
=IF(B2="A","Name1",IF(B2="B","Name2",IF(B2="C","Name3",))) etc, etc. til the entire alphabet is used.
I need to find an easier way! It does work just fine for what I need (especially since I copy the formula from another spreadsheet & just paste in) but other people are scared to use it so my boss asked me to come up with something else.
Is there a way to mark the If formula for 'begins with' text so I won't have to separate the name first? I am also willing to try a VBA macro, but I don't know how to do those (yet). I hate to ask someone to write the entire thing (unless you just happen to have exactly what I need already :biggrin: ). I need help to shorten this!
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
hurricanedaphne,

Welcome to the MrExcel forum.

What version of Excel are you using?

Can we see some of your raw data?

You will generally get much more help (and faster) in this forum if you can post your small samples directly in the forum.

Here are three possible ways to post small (copyable) screen shots directly in your post:

Please post a screenshot of your sheet(s), what you have and what you expect to achieve, with Excel Jeanie HTML 4 (contains graphic instructions).
http://www.excel-jeanie-html.de/html/hlp_schnell_en.php

or
RichardSchollar’s beta HTML Maker -...his signature block at the bottom of his post

or
Borders-Copy-Paste
 
Upvote 0
Try using a VLOOKUP table, e.g. list all the letters in Y2:Y27 and corresponding names in Z2:Z27 then use this formula in B2 copied down

=VLOOKUP(LEFT(A2,1),Y$2:Z$27,2,0)
 
Upvote 0
Thank you so much for your help! And, per comment # 3, next time i will include screen shots !
Thank you!
Thank you!
Thank you!!!!!
 
Upvote 0

Forum statistics

Threads
1,214,639
Messages
6,120,679
Members
448,977
Latest member
dbonilla0331

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