Can you loop a recorded VBA?

Status
Not open for further replies.

Mcls2020

New Member
Joined
Feb 6, 2020
Messages
14
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: 7
  • 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: 6

Some videos you may like

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,269
Office Version
  1. 365
Platform
  1. Windows
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).
 
Status
Not open for further replies.

Watch MrExcel Video

Forum statistics

Threads
1,123,253
Messages
5,600,544
Members
414,387
Latest member
Vincent88

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
Top