VBA for copying data from multiple ranges until blank into a list

bogeys2birdies

New Member
Joined
Nov 21, 2024
Messages
1
Office Version
  1. 365
  2. 2021
Platform
  1. MacOS
  2. Web
Screenshot 2024-11-21 at 2.17.02 PM.png
Screenshot 2024-11-21 at 2.17.28 PM.png
Screenshot 2024-11-21 at 2.17.14 PM.png



Hello, I am trying to copy values from Columns R, W, X and Z from the Template (red pic) into columns A, B, C, D. I need a VBA to go through these columns until there is a blank row and then paste it into A,B,C as so it creates a nice list going down. I will need this code to continue multiple times through out my sheet (up to 50 people) and continue to copy and paste into the list. Thank you for your help in advance. I need it!
 

Attachments

  • Screenshot 2024-11-21 at 2.17.14 PM.png
    Screenshot 2024-11-21 at 2.17.14 PM.png
    38.6 KB · Views: 12

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Could just use power query
Book1
PQRSTUVWXYZAA
3CourseSKUNameDexMatClub TypLoftBrandModelClub NameCostCondition
4Temp to follow1010name1dex1Mat1Driver10CallMod1ClubNm1100New
5Temp to follow1011name2dex2Mat2Wedge30TayMod2ClubNm2200New
6Temp to follow1012name3dex3Mat3Iron25PingMod3ClubNm3150New
7Temp to follow1013name4dex4Mat4Putter56OddMod4ClubNm4456New
8Temp to follow1014name5dex5Mat5Wedge35CallMod5ClubNm5234New
9Temp to follow1015name6dex6Mat6Iron20TayMod6ClubNm6160New
10Temp to follow1016name7dex7Mat7Wedge32TayMod7ClubNm7877New
11Temp to follow1017name8dex8Mat8Iron13PingMod8ClubNm8324New
12
13Temp to follow1019name10dex10Mat10Wedge15TayMod10ClubNm10456New
14Temp to follow1020name11dex11Mat11Driver20PingMod11ClubNm11134New
15Temp to follow1021name12dex12Mat12Wedge28OddMod12ClubNm12142New
16Temp to follow1022name13dex13Mat13Iron13CallMod13ClubNm13155New
17Temp to follow1023name14dex14Mat14Putter11TayMod14ClubNm14546New
Sheet1

Book1
ABCD
1NameBrandModelCost
2name1CallMod1100
3name2TayMod2200
4name3PingMod3150
5name4OddMod4456
6name5CallMod5234
7name6TayMod6160
8name7TayMod7877
9name8PingMod8324
10name10TayMod10456
11name11PingMod11134
12name12OddMod12142
13name13CallMod13155
14name14TayMod14546
Table1


Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Course", type text}, {"SKU", Int64.Type}, {"Name", type text}, {"Dex", type text}, {"Mat", type text}, {"Club Typ", type text}, {"Loft", Int64.Type}, {"Brand", type text}, {"Model", type text}, {"Club Name", type text}, {"Cost", Int64.Type}, {"Condition", type text}}),
    #"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Course] = "Temp to follow")),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Course", "SKU", "Dex", "Mat", "Club Typ", "Loft", "Club Name", "Condition"})
in
    #"Removed Columns"
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,126
Members
453,021
Latest member
Justyna P

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