+ Reply to Thread
Results 1 to 2 of 2

Troubleshooting For Each loop

  1. #1
    Registered User
    Join Date
    06-26-2019
    Location
    California, US
    MS-Off Ver
    Office 365
    Posts
    36

    Troubleshooting For Each loop

    I want to check every cell on column G in sheet 2 for "Savings"
    If "Savings" is found, then I want the next value pasted on sheet 5. Offset(1) doesn't work because the data below "Savings" may have a random number of blank rows.

    This code works if I have Sheet 2 active before I run the macro. It doesn't work properly if I have any other sheet open though. I highlighted the issue in red. I have no idea why With isn't working properly. (Even if I do something simple like With s2, the Range/Cells commands don't seem to work properly for me)

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    07-21-2019
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    58

    Re: Troubleshooting For Each loop

    Hi,
    try this:
    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. [SOLVED] Help Troubleshooting Macro?
    By AmyV1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2017, 04:19 PM
  2. Need help troubleshooting userform
    By dragonabsurdum in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-30-2013, 03:03 PM
  3. [SOLVED] IF statement troubleshooting
    By MARKSTRO in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-14-2012, 08:30 PM
  4. Macro to loop through all files in a folder troubleshooting (excel for mac)
    By TSMIII in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-31-2011, 09:31 AM
  5. troubleshooting SUMPRODUCT
    By rob_barbour in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-02-2007, 01:50 PM
  6. troubleshooting generate
    By Don Juan in forum Excel General
    Replies: 0
    Last Post: 10-01-2006, 05:29 PM
  7. [SOLVED] Troubleshooting Spreadsheets
    By valkyrie in forum Excel General
    Replies: 1
    Last Post: 07-31-2006, 11:28 PM

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