Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Auto Fill Macro with Input Box

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Los Angeles, CA
    Posts
    752
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have the macro below that looks at the sheet name in column A and copies what is in Column B to the sheet that is column A.

    Ex
    Col A Col B
    Sheet1 5000

    So in Sheet 1 it adds 5000

    The problem is I want the cell I want the data to go to change. This means when I want it to go somewhere else I have to go into the macro and change the target cell.

    Can someone please help me create an input box where the box would appear and I would just enter the the column and row and the macro would then run.

    Here is the target cell for this week
    .Cells(21, 15)

    Thanks

    Sub Macro1()


    myRow = 1

    Do Until Cells(myRow, 1) = ""
    myName = Cells(myRow, 1)
    Sheets("" & myName).Cells(21, 15) = Cells(myRow, 2)
    myRow = myRow + 1
    Loop

    '
    End Sub

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Sydney/Brisbane , Australia
    Posts
    542
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    targetcell = inputbox ("enter target cell here")

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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