+ Reply to Thread
Results 1 to 10 of 10

Need to check if two cells=5 then copy information into next row on different sheet.

  1. #1
    Registered User
    Join Date
    09-08-2019
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    5

    Need to check if two cells=5 then copy information into next row on different sheet.

    Hi Guys,

    I'm struggling a bit too much than I'd like to admit on this.
    I have 21 Sheets and need to check sheets 3, 12, 17
    If C2 and D2 both equal 5 then copy entire row into sheet 21 in next available row.
    And i need this to repeat down to C250 and D250.

    Thanks.

  2. #2
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Need to check if two cells=5 then copy information into next row on different sheet.

    Start with
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-08-2019
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    5

    Re: Need to check if two cells=5 then copy information into next row on different sheet.

    Unfortunately nothing with this. If the values were from an excel IF function, would this affect the outcome?
    For full clarity the sheets were orignally named.
    3 - Brett
    12 - Matt
    17 - Tony
    I did change these to work with array but no luck.

  4. #4
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Need to check if two cells=5 then copy information into next row on different sheet.

    try
    Please Login or Register  to view this content.
    although this does work here whatever sheets are called

    Please Login or Register  to view this content.
    Last edited by nigelog; 09-11-2019 at 05:11 AM.

  5. #5
    Registered User
    Join Date
    09-08-2019
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    5

    Re: Need to check if two cells=5 then copy information into next row on different sheet.

    Thanks, second one seems to be working better than the first with my other formulas. I should've been more specific originally. I meant, if C=5 and D=5 then copy. Thats my fault. I've swapped 5 to 10 on your code, same thing and its working almost perfectly. I just have to figure out why some come through with #REF! and it's complete.
    Thanks a lot for your help.

  6. #6
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Need to check if two cells=5 then copy information into next row on different sheet.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-08-2019
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    5

    Re: Need to check if two cells=5 then copy information into next row on different sheet.

    Updated.
    Still having some issues with the reference. It seems that when it copies the code over, the IF statements are starting at I1 again.
    e.g. =IF(September!$I1=1309,September!D1,"") on row 5 so this should be =IF(September!$I5=1309,September!D1,"")
    This pulls through no info as the I1 check should be I1=153.

    I think it would be easier to change to collecting data from the September tab and thats it and i can filter again after the fact.
    What do i need to change if im just going to look for data in the one sheet?

    Thanks again.

  8. #8
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Need to check if two cells=5 then copy information into next row on different sheet.

    Just paste over the values so no references
    Change
    Please Login or Register  to view this content.
    or filter method

    Filter method with no looping
    Please Login or Register  to view this content.
    or array
    Please Login or Register  to view this content.
    Last edited by nigelog; 09-12-2019 at 07:28 AM.

  9. #9
    Registered User
    Join Date
    09-08-2019
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    5

    Re: Need to check if two cells=5 then copy information into next row on different sheet.

    Damn mate, you're a genius.

    Thanks bro, exactly what i needed.

  10. #10
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Need to check if two cells=5 then copy information into next row on different sheet.

    Glad to help. Thanks for marking as solved

+ 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. VBA/Macro to Automatically Update, Copy, & Sort information from Sheet 1 to Sheet 2
    By E9demello in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-10-2017, 09:37 AM
  2. [SOLVED] If check box is checked, then copy specific cells to new sheet
    By thedefense in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-10-2014, 02:46 PM
  3. Want to copy cells from one sheet to another using the check box.
    By shadowpuck in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2014, 09:17 AM
  4. [SOLVED] copy cells from a row in one of several sheets into another sheet based on check box.
    By SMcuthbert in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-30-2013, 08:47 AM
  5. [SOLVED] Copy cells from a row in one sheet to next row in second sheet based on check box
    By SMcuthbert in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-25-2013, 01:26 PM
  6. Check cell Value in range and copy specific cells to another sheet
    By jmethejedi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-08-2013, 06:25 PM
  7. Copy Cells to another sheet if information in the row matchs
    By vew32 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2012, 01:49 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