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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,213,549
Messages
6,114,264
Members
448,558
Latest member
aivin

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