+ Reply to Thread
Results 1 to 5 of 5

Copy/Paste Macro that applies to all lines

  1. #1
    Registered User
    Join Date
    01-04-2006
    Posts
    70

    Copy/Paste Macro that applies to all lines

    Hi.

    I need a bit of code that:

    When I enter data into A1 on Sheet 1 it automatically takes the data from column B on Sheet 2 and pastes it into column B on Sheet 1.

    I don't want it to be row specific - so it will work on all rows on Sheet 1

    I want to have a whole series of VLOOKUP maths on Sheet 2 that I can then hide.....

    Thanks

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Copy/Paste Macro that applies to all lines

    That doesn't seem to make sense.
    When I enter data into A1 on Sheet 1 it automatically takes the data from column B on Sheet 2 and pastes it into column B on Sheet 1.
    All of column B or B1?
    I don't want it to be row specific - so it will work on all rows on Sheet 1
    Does it overwrite?

    Please remove all doubt and post a workbook.

  3. #3
    Registered User
    Join Date
    01-04-2006
    Posts
    70

    Re: Copy/Paste Macro that applies to all lines

    Hi, sorry, wasn't clear enough.

    1./ I insert some information into A1 on Sheet 1
    2./ The code copies the information from B1 on Sheet 2
    3./ It then pastes it into B1 on Sheet 1.

    I don't want it to be row specific - so when I enter information into A26, the code repeats the process for B26.

    And yes, overwriting what is currently in column B.

    Hope that helps

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Copy/Paste Macro that applies to all lines

    What about just adding this formula to sheet1 B1 and down?

    =IF(A1="","",INDIRECT("Sheet2!B"&ROW()))

  5. #5
    Registered User
    Join Date
    01-04-2006
    Posts
    70

    Re: Copy/Paste Macro that applies to all lines

    The trouble is that I want to be able to insert/delet lines on Sheet 1 and for the code to go on working. If I use an in cell function, it won't exist when I insert a new line....

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1