Can you loop a recorded VBA?

Status
Not open for further replies.

Mcls2020

New Member
Joined
Feb 6, 2020
Messages
18
Office Version
  1. 365
Platform
  1. MacOS
This is the code I got from recording a Macro:

Sub BugClub()
'
' BugClub Macro
'
ActiveCell.FormulaR1C1 = "='Child''''s Details'!R[-1]C[6]"
Range("C3:C4").Select
ActiveCell.FormulaR1C1 = "='Child''''s Details'!R[-1]C[6]"
Range("A1:D5").Select
Selection.Copy
Range("A6").Select
ActiveSheet.Paste
Range("B8:B9").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "='Child''''s Details'!R[-1]C[6]"
Range("B8:B9").Select
ActiveCell.FormulaR1C1 = "='Child''''s Details'!R[-5]C[6]"
Range("C8:C9").Select
ActiveCell.FormulaR1C1 = "='Child''''s Details'!R[-5]C[6]"
Range("D14").Select
Loop Until rngSrc.Value = "" Range("B3:B4").Select
End Sub

Is there a easy way to loop this code.

Would like the code to run instill there is no information in the cell.
 

Attachments

  • Screen Shot 2020-07-06 at 10.50.13 AM.png
    Screen Shot 2020-07-06 at 10.50.13 AM.png
    39.1 KB · Views: 8
  • Screen Shot 2020-07-05 at 10.22.23 PM.png
    Screen Shot 2020-07-05 at 10.22.23 PM.png
    33.2 KB · Views: 7

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Duplicate Repeat function

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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