+ Reply to Thread
Results 1 to 4 of 4

Populate data on another worksheet

  1. #1
    Registered User
    Join Date
    01-10-2005
    Posts
    8

    Populate data on another worksheet

    I'm sure this question has been answered numerous times, but brain farts are preventing me from finding it.

    I'm trying to create a macro that will cell-by-cell look at a range of data on Sheet1 and conditionally apply a "1" to Sheet2 and copy the cell to Sheet4. I've gotten this to work by doing

    Please Login or Register  to view this content.
    However, I'm sure there's easier (thus faster) way to do this without having to jump from sheet to sheet. I know I can populate the ActiveCell that will detect a value on another sheet using relative coordinates (ActiveCell.FormulaR1C1 = "='Sheet2'R[-1]C[-1]", for example), but I haven't figured out a way to do this using things that aren't Worksheet formulas.

    I tried doing:

    Please Login or Register  to view this content.
    Attempting to only have to offset the cell on Sheet1, but that didn't work. However, I think I'm on the right path. Any help would be greatly appreciated. Thanks.

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    You can try with this code:
    Please Login or Register  to view this content.
    Where the 'Cells' instruction is to use: Cell (row, column).
    For instance:
    cells(3,5) or cells(3,"e") referes to range 'E5'.

    I hope it can help you.

    Regards,
    Antonio

  3. #3
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    I'm sorry for my error:
    Cells(3,5) or cells(3,"e") refers to range 'E3' and not to range 'E5'.

  4. #4
    Registered User
    Join Date
    01-10-2005
    Posts
    8
    Perfect! Exactly what I was looking for, and works like a charm. Thank you.

+ 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