Move to new sheet VBA

traumaticcube

New Member
Joined
Jan 18, 2022
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hi All,

First off I'm sorry if this has been posted before, I couldn't find anything specifically with this many values. I'm having some trouble wrapping my head around moving data from a master sheet to 26 other sheets based on the first letter of the last name. I successfully got it to work for just the "A's" but I can't figure out how to do it for the rest B through Z.

Basically, this is the sheet:
#Last NameFirst NameAddressCityStateZipPhoneSort Value
1AppleJim123Main StCA10000123-456-7890A
2DoeJane123Main StNY100008964D

I want to be able to move the rows based on "Sort Value" which is column "I," to a new sheet. I have 27 sheets on the book, Main and then A through Z. I was able to get some VBA code I found on here to work and move the A's over but I can't figure out an efficient way to get it to move the 25 other letters over to their respective sheets. I'd also like it to move automatically.

Thanks for any help.
 
You are welcome!

I hope my methodology makes sense. I documented my code to explain what each step is doing, but let me know if you have any questions.
It definitely does and it's very nice to see it commented out as it goes through. I see you used the value for column J to actually move it to the same-named sheet which is brilliant.
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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