Results 1 to 11 of 11

Thread: Vba to insert text in range of cells

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    VBAX Newbie
    Joined
    Feb 2016
    Posts
    4
    Location
    here is a dirty sample. you could make this better if you made the words into constant variables and then looped through the spreadsheets.

    Range("W2").Select
        ActiveCell.FormulaR1C1 = "Fit"
        Range("W3").Select
        ActiveCell.FormulaR1C1 = "Web To"
        Range("W4").Select
        ActiveCell.FormulaR1C1 = "To"
        Range("W5").Select
        ActiveCell.FormulaR1C1 = "TA"
        Range("W6").Select
        ActiveCell.FormulaR1C1 = "IDS"
        Range("W7").Select
        ActiveCell.FormulaR1C1 = "OWN"
        Range("W2:W7").Select
        Selection.Copy
        Sheets("Sheet1").Select
        ActiveWindow.SmallScroll ToRight:=12
        Range("X2").Select
        ActiveSheet.Paste
        Sheets("Sheet2").Select
        ActiveWindow.SmallScroll ToRight:=11
        Range("X2").Select
        ActiveSheet.Paste
        Sheets("Sheet3").Select
        ActiveWindow.SmallScroll ToRight:=12
        Range("X2").Select
        ActiveSheet.Paste
        Sheets("Sheet4").Select
        ActiveWindow.SmallScroll ToRight:=10
        Range("W2").Select
        ActiveSheet.Paste
        Sheets("Sheet5").Select
        ActiveWindow.SmallScroll ToRight:=11
        Range("X2").Select
        ActiveSheet.Paste
    Last edited by Aussiebear; 04-21-2023 at 07:01 PM. Reason: Adjusted the code tags

Posting Permissions

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