First Time Ever Using A Macro

NoviceNoob

New Member
Joined
Sep 22, 2016
Messages
2
Hi everyone - hoping someone can teach me something about Macro's today!

I have a filtered worksheet where I need to copy, paste, make the cells below it equal what I just pasted, and then drag down onto another tab. After that loop, I need to go back to the original tab, go down one filtered row and repeat. I have the initial Macro where I can continue to copy, paste, equate the cells, drag down, on the other tab, but when I hit the macro hotkey, it does the same data. How can I rework my code to have this done? I have no coding experience what so ever as well. I appreciate any help!

See Codes:

Sub WorkingConditions()
'
' WorkingConditions Macro
'
'
ActiveWindow.SmallScroll Down:=1
ActiveCell.Offset(35, 0).Range("A1:F1").Select
Selection.Copy
Sheets("Working Conditions").Select
ActiveWindow.SmallScroll Down:=1
ActiveCell.Offset(10, 0).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[-1]C"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=R[-1]C"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=R[-1]C"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=R[-1]C"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=R[-1]C"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=R[-1]C"
ActiveCell.Offset(0, -5).Range("A1:F1").Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:F11"), Type:= _
xlFillDefault
ActiveCell.Range("A1:F11").Select
End Sub
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I guess this code would may be easier to loop? So I need to copy the next filtered range under ("F994:K994") on the next loop, then when I paste those ranges in a the other sheet 12 times, I need to leave off on the next range cell. In this example, the next cell would be ("A535").

Right now it keeps pasting over the previous 12 I just did. "A523:A535" Again, thank you for any help!



Sub WorkingConditions()
'
' WorkingConditions Macro
'
' Keyboard Shortcut: Ctrl+h
'
Range("F994:K994").Select
Selection.Copy
Sheets("Working Conditions").Select
Range("A523").Select
ActiveSheet.Paste
Range("A524").Select
ActiveSheet.Paste
Range("A525").Select
ActiveSheet.Paste
Range("A526").Select
ActiveSheet.Paste
Range("A527").Select
ActiveSheet.Paste
Range("A528").Select
ActiveSheet.Paste
Range("A529").Select
ActiveSheet.Paste
Range("A530").Select
ActiveSheet.Paste
Range("A531").Select
ActiveSheet.Paste
Range("A532").Select
ActiveSheet.Paste
Range("A533").Select
ActiveSheet.Paste
Range("A534").Select
ActiveSheet.Paste
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,605
Messages
6,120,473
Members
448,967
Latest member
visheshkotha

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