Consulting

Results 1 to 2 of 2

Thread: How to add row in second Sheet using ActiveCell in first sheet?

  1. #1

    How to add row in second Sheet using ActiveCell in first sheet?

    Hello.

    I have two exactly the same sheets, but one in my national language, and one in English. I've made a macro that adds a row under ActiveCell and pastes the formulas needed there.
    The problem i have - it doesnt affect the English sheet. And i need it mirrored... Absolutely no idea how to do it! Could you please help me?

    Here's the code i use. It's pretty strange, because i had to work around some problems (xldown wouldnt bring me to the last cell)
    ActiveCell.Offset(1, 0).EntireRow.Insert
    Range(ActiveCell.Offset(0, 1), ActiveCell.Offset(0, 5)).Copy
    ActiveCell.Offset(1, 1).PasteSpecial (xlPasteFormulas)
    Application.CutCopyMode = False
    ActiveCell.Offset(0, -1).Select
    The real problem is... Excel doesnt know where to begin in the Second sheet. It doesnt mirror the ActiveCell address from first sheet, and i have no idea how to tell him this...

    Thanks!
    Last edited by asktheages; 12-19-2022 at 06:50 AM.

  2. #2
    Okay, i found solution on my own. To anyone that might need this answer:
    Dim s As String
    s = ActiveCell.Address
    
    
    ActiveCell.Select
    Worksheets(3).Activate
    Range(s).Select
    Solved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •