C+P macro to dest. based on value
Closed
Matrixfan
-
Dec 6, 2011 at 08:37 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Dec 7, 2011 at 08:36 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Dec 7, 2011 at 08:36 AM
Related:
- C+P macro to dest. based on value
- Excel macro to create new sheet based on value in cells - Guide
- Spell number in excel without macro - Guide
- Based on the values in cells b77 b81 c77 - Excel Forum
- We couldn't find an account matching the login info you entered, but found an account that closely matches based on your login history. - Facebook Forum
- Run macro when cell value changes by formula ✓ - Excel Forum
1 response
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Dec 6, 2011 at 08:53 AM
Dec 6, 2011 at 08:53 AM
Try this
Sub one_touch() Dim lActiveRow As Long lActiveRow = ActiveCell.Row Range(Cells(lActiveRow, "A"), Cells(lActiveRow, "H")).Copy Sheets("Sheet2").Range("A3").Insert Shift:=xlDown Application.CutCopyMode = False End Sub
Dec 7, 2011 at 05:43 AM
I'm still getting an error - "Runtime error 9: Subscript out of range" on Sheets("Sheet2").Range("A3").Insert Shift:=xlDown
Just to elaborate on what I'm looking for:
the paste destination tab is variable based on the value in the first column of the row (which is someones name). The position it goes into is "A3" and then pastes into there by pushing everything else down.
The whole seems to work, except for the one line.
Thanks for the help so far - you're a lifesaver (plus, I get to learn more about Macros, etc)
Dec 7, 2011 at 08:36 AM