+ Reply to Thread
Results 1 to 4 of 4

VBA sheet loop only updating active open sheet

  1. #1
    Registered User
    Join Date
    02-01-2016
    Location
    Cambridge, England
    MS-Off Ver
    365
    Posts
    2

    Unhappy VBA sheet loop only updating active open sheet

    Hello all,

    I am in a bit of a dilemma, I have created a VBA loop to cycle through all sheets in my open workbook and look for two values which appear in certain columns on the same row. However, it only finds the value I need it to if the sheet is active (I need it to cycle through all sheets).

    Ideally once a match is found, I require it to copy a cell value on another worksheet and paste it on the same row as the found values but in another column.

    As a breakdown, I need the code to:

    1. Search all sheets to find a match for the value on the ‘QC Release’ sheet (Cell J61) AND a match for the value on the ‘QC Release’ sheet (Cell K61) on the same row. The match for J61 will always appear in column F of the searched sheet and the match for K61 will always appear in column B of the searched sheet.

    2. Once the row with matches on it has been identified on a sheet, I need the code to copy cell N61 on sheet ‘QC Release’ and paste it into column J of the identified row.

    The match we are searching for will only appear once on one sheet across all searched sheets.

    I would appreciate any help any of you can give me, my head in going in circles. To give you some idea this is my code below… Many thanks!!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,833

    Re: VBA sheet loop only updating active open sheet

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    02-01-2016
    Location
    Cambridge, England
    MS-Off Ver
    365
    Posts
    2

    Re: VBA sheet loop only updating active open sheet

    Hi Mumps1,

    Thank you for your quick reply, unfortunately this hasn't worked - I tried using ws.Cells previously to no avail! It stops finding any matches if I do it that way

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,833

    Re: VBA sheet loop only updating active open sheet

    Can you attach a copy of your file?

+ 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. [SOLVED] Open Workbook to last active sheet
    By zplugger in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2015, 10:39 AM
  2. Replies: 1
    Last Post: 01-04-2014, 06:37 PM
  3. Subroutine loop -- Stops after first, active sheet
    By za20001 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-02-2011, 02:51 PM
  4. Active Desktop that is an excel sheet, Automatic updating
    By DeathMagnetic in forum Excel General
    Replies: 0
    Last Post: 09-01-2009, 06:30 PM
  5. updating links only for the active sheet
    By alpertheidiot in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-15-2009, 07:24 AM
  6. Copy my active sheet to a new sheet and open with an input form
    By Brad Withrow in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-05-2006, 11:00 PM
  7. Trouble turning off sheet updating and returning to original active cell
    By Giznawz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-01-2005, 06: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