+ Reply to Thread
Results 1 to 10 of 10

Help need to copy data from sheet 1 to sheet 3 if cell in sheet 1 = Yes

  1. #1
    Registered User
    Join Date
    02-15-2015
    Location
    Melbourne
    MS-Off Ver
    2010
    Posts
    5

    Help need to copy data from sheet 1 to sheet 3 if cell in sheet 1 = Yes

    Hi All,
    I need some assistance with a work book, I need to Copy a series of cells from sheet A to Sheet C, IF a specific cell = "Yes" .

    Specifically in the attached workbook, SHEET A, IF cell B column ( I.e B8 ) = "Yes", I need the information in Cells A8, C8, D8, E8, F8 & G8, copied to SHEET C Cells D,E, F, G, H & I.

    If the Cell in B column does not = "Yes" then no action is required.

    The information in SHEET C is to be a summary so I need to only show the YES rows.


    Thanks in advance as I vaguely know that this is possible but it is apparently beyond my very basic ability to make this function as I would like.

    Thanks
    NoIDeer.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Help need to copy data from sheet 1 to sheet 3 if cell in sheet 1 = Yes

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-15-2015
    Location
    Melbourne
    MS-Off Ver
    2010
    Posts
    5

    Re: Help need to copy data from sheet 1 to sheet 3 if cell in sheet 1 = Yes

    Thanks for the quick reply, but just to show my ignorance how do I insert that script into the workbook to make it run?

    And just for the record I am starting to feel overwhelmed knowing what I do not know!

    Thanks

  4. #4
    Registered User
    Join Date
    02-15-2015
    Location
    Melbourne
    MS-Off Ver
    2010
    Posts
    5

    Re: Help need to copy data from sheet 1 to sheet 3 if cell in sheet 1 = Yes

    OK thanks again, but, (sorry) worked out how to run the script but I am only getting the headings for each column (Row 6) being copied to the SHEET C. Then I get a Run time error 1004 on the ROW B8 if it is selected as Yes (dropdown box in Column B)


    Thanks.

  5. #5
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Help need to copy data from sheet 1 to sheet 3 if cell in sheet 1 = Yes

    Amended:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    02-15-2015
    Location
    Melbourne
    MS-Off Ver
    2010
    Posts
    5

    Re: Help need to copy data from sheet 1 to sheet 3 if cell in sheet 1 = Yes

    One more question if I may, and this may be a result of my application ( as I'm way out of my depth), Should this actually run automatically when data is input, as I can only get it to run when I manually run the VBA Project?

  7. #7
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Help need to copy data from sheet 1 to sheet 3 if cell in sheet 1 = Yes

    Hello NoIDeer,

    Just an alternative for you. I had a good search through your work book, mainly Sheet C, and noticed a lot of merged cells and "residues" in cells a long way down the sheet (C). I removed all the merged cells and the tables you have in Sheet C down at around row 75. All these interruptions have a tendency to play silly buggers with the code as the code searches for the next available row from the bottom up. You can replace these tables to the right of Column I.
    These interruptions could be the cause of the error messages you are receiving in Stynkynts code which, BTW, is spot on.

    Anyway, the alternative:-

    Please Login or Register  to view this content.
    The code should transfer all data with the criteria "Yes" whether it is one row or multiple rows.

    BTW, delete this line of code from the macro in the attached work book:-

    Please Login or Register  to view this content.
    I was toying with another idea and inadvertently left it behind.

    I'll leave it with you.

    Cheers,
    vcoolio.
    Attached Files Attached Files
    Last edited by vcoolio; 02-16-2015 at 06:48 AM.

  8. #8
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Help need to copy data from sheet 1 to sheet 3 if cell in sheet 1 = Yes

    If you want it to be triggered upon selecting "Yes" in column B, this code will do. It needs to be properly placed in the correct sheet object

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    02-15-2015
    Location
    Melbourne
    MS-Off Ver
    2010
    Posts
    5

    Re: Help need to copy data from sheet 1 to sheet 3 if cell in sheet 1 = Yes

    Thanks Guys,
    Both of your codes work spot on once I got them in the right spot and tidied up the spreadsheets a bit.

    I think I was having trouble with some merged cells

    The copied cells stop at the first blank cell though.

    As an afterthought, is it theoretically possible to have the same function take information from two or more sheets and collate into the one summary?

  10. #10
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Help need to copy data from sheet 1 to sheet 3 if cell in sheet 1 = Yes

    As an afterthought, is it theoretically possible to have the same function take information from two or more sheets and collate into the one summary?
    Yes, however, a lot of specific parameters would need to be defined by you. There can be no room for guessing.

+ 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. Replies: 4
    Last Post: 08-21-2014, 07:34 PM
  2. [SOLVED] Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1
    By VBADUD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 04:18 AM
  3. Copy Sheet / Create & Name New Sheet / Insert Before a Sheet / Paste Data
    By thinkspac in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2012, 02:27 PM
  4. [SOLVED] Macro to Copy Data from one Sheet A to Sheet B based on value in cell on sheet A
    By scass in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-11-2012, 07:21 PM
  5. Replies: 1
    Last Post: 10-30-2009, 10:58 AM

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