+ Reply to Thread
Results 1 to 4 of 4

IF column contains X, Copy values into other worksheet, with all source formatting

  1. #1
    Registered User
    Join Date
    04-27-2022
    Location
    London
    MS-Off Ver
    Microsoft 365
    Posts
    2

    IF column contains X, Copy values into other worksheet, with all source formatting

    Hi - I have an action tracker; actions are split across 7 action owners. I want to create a tab per action owner, which i can then use another macro to export into a separate workbook and send out to them.

    I managed to do this, but as the action tracker itself contains formulas, when it copied and pasted over into the new workbook, a lot didn't make sense. When I have changed the code to use .PasteSpecial, it seems to bypass the IF formula and now just copies all actions into all tabs.

    NB This is the code for 1 of 7 of the action owners, but in the interests in keeping the code as short as poss, i have just pasted the first 1.

    Please Login or Register  to view this content.
    If i write the final section as:

    Please Login or Register  to view this content.
    It copies over as you would expect, but the formulas come through as formulas not values, and therefore some cells don't make sense.

    Any help would be greatly appreciated!

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,498

    Re: IF column contains X, Copy values into other worksheet, with all source formatting

    Are there multiple "Simon Jones" and other names in the one Column you're checking?
    If so, have a look at AutoFilter

    Maybe read the top yellow banner and attach a workbook with personal data changed.

  3. #3
    Registered User
    Join Date
    04-27-2022
    Location
    London
    MS-Off Ver
    Microsoft 365
    Posts
    2

    Re: IF column contains X, Copy values into other worksheet, with all source formatting

    The column is effectively the action owner column, so there are multiple names in the column (coincidentally, only one for Simon though).

    The column has a filter on it.

    I can't seem to attach a file, a plain white box with nothing in it to click appears when I try...

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,498

    Re: IF column contains X, Copy values into other worksheet, with all source formatting

    If I understand it right, this might do what you want.
    Change all references where required (sheet names, names in Array etc)
    It assumes that all sheets with names as in Array are present.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy Source Worksheet to Target Worksheet updating Named Ranges (with Source Ranges)
    By CRIMEDOG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2018, 07:19 AM
  2. Replies: 3
    Last Post: 09-08-2013, 06:38 PM
  3. [SOLVED] Copy and Paste values and source formatting
    By danfullwood in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2013, 04:51 AM
  4. Using Loop to copy different column values from a Source tab to 3 different Excel tabs
    By dipjyoti123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-13-2013, 04:48 PM
  5. macro to merge values from one column into one cell and retain source formatting.
    By Scott Taylor in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 12-05-2012, 04:41 PM
  6. copy values from a worksheet to another workbook. source workbook name unknown
    By sark666 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-12-2009, 11:05 PM

Tags for this Thread

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