Slizer6893
Active Member
- Joined
- Oct 25, 2013
- Messages
- 271
Alright hopefully this is fairly straight forward I just can't think of the easiest way to do this. Basically I have two sheets, one I am changing one thing a Model # in B1, this auto updates the Item Name in B2...
The model number is already set up to pull all the data I need in my sheet which then creates totals at the bottom. These totals I have pulled to a summary sheet through this code
Fairly simple code that's only purpose is to get the data under the last model # I did. However I need to fill column A with the model number that the code last was used with, and column B with the item name. I could add them to the bottom near the totals and include them in the copying but I want to avoid going that route.
If I have to use that route I will but I feel like I could do something during the copying/pasting that also grabs B1 and B2 and fills column A/B with it to the last row that was copied over with my macro.
I will keep testing to see if I can figure it out
Thanks!
The model number is already set up to pull all the data I need in my sheet which then creates totals at the bottom. These totals I have pulled to a summary sheet through this code
Code:
Sub CopytoSummary()'
Dim Copysheet As Worksheet
Dim pastesheet As Worksheet
Dim lr As Long
Dim rng As Range
Set Copysheet = Worksheets("Overlay Filler")
Set pastesheet = Worksheets("Take Summary")
'Set each variable
lr = pastesheet.Cells(Rows.Count, 1).End(xlUp).Row
Copysheet.Range("E365:BG372").Copy
pastesheet.Range("c2").End(xlDown).Offset(1, 0).PasteSpecial Paste:=xlPasteValues, Transpose:=True
End Sub
Fairly simple code that's only purpose is to get the data under the last model # I did. However I need to fill column A with the model number that the code last was used with, and column B with the item name. I could add them to the bottom near the totals and include them in the copying but I want to avoid going that route.
If I have to use that route I will but I feel like I could do something during the copying/pasting that also grabs B1 and B2 and fills column A/B with it to the last row that was copied over with my macro.
I will keep testing to see if I can figure it out
Thanks!