VBA Loop help for a few lines of code

CGalavitz

New Member
Joined
Apr 11, 2019
Messages
2
Hello,

I just registered but I've been lurking here a while.

I am trying to teach myself how to loop.

This is the macro I have that I would like to loop.

I believe I have enough info there so you know what I am trying to accomplish.

Thanks a ton

Sub Macro2()
'
' Macro2 Macro
'


'
Sheets("Data").Select
'A40 will continue to go up until blank cell is reached'
Range("A40").Select
Selection.Copy
Sheets("Price Sheet").Select
Range("A1").Select
ActiveSheet.Paste
Range("D3:E3").Select
Application.CutCopyMode = False
Selection.Copy
'CHANGE THE NEXT LINE TO WHERE ITS GOING'
'CELL V1 WILL CONTINUE TO GO UP UNTIL "A40" IS A BLANK CELL'
Range("V1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Data").Select

End Sub
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi & welcome to MrExcel.
Can you please explain in words what you are trying to do?
 
Upvote 0
I have a list of part names that I wan't to copy into another sheet that contains a bunch of formulas and charts.

This will give me two values that I then want to copy to a specific location to create a price list.
 
Upvote 0
Please remember that we cannot see your workbook, nor can we read your mind. ;)
Can you therefore please try explaining again.
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,520
Members
448,968
Latest member
Ajax40

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