Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. Dim TargetRow As Variant
  2. TargetRow = InputBox("Insert row # where data should be inserted. This should take the format XX:XX (e.g. 90:90 for row 90)", "All Industries Row", "XX:XX")
  3.  
  4. wbThis = ThisWorkbook.Name
  5. Windows(wbThis).Activate
  6. Rows(TargetRow).Select
  7. Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromAbove
  8.  
  9. Windows("otherworksheet.xlsx").Activate
  10. Range("A119:J119").Select
  11. Application.CutCopyMode = False
  12. Selection.Copy
  13. Windows(wbThis).Activate
  14. Range(TargetRow).Select
  15. Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
  16. xlNone, SkipBlanks:=False, Transpose:=False
  17. Application.CutCopyMode = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement