+ Reply to Thread
Results 1 to 3 of 3

Searching cells in multiple worksheets

  1. #1
    Forum Contributor
    Join Date
    09-22-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Office 2019
    Posts
    310

    Searching cells in multiple worksheets

    I'm trying to get VBA to look at a particular cell across several worksheets and to put up a message (or carry out another function) if the information in any of the cells is not correct. Cell Z38 can have certain text in it or it can be empty, but anything other than that it needs to tell me which sheet (Entry Form) has the different text in.

    I've built the following code, but it always returns "New Team in Entry Form 1!" regardless of which form's cell Z38 I put the different wording in. (I'm only trying out 4 sheets at the moment). I've tried removing the .Value from Form (1) IF, but it makes no difference.

    (There are suitable End If's after this lot too)

    Any ideas please??

    Please Login or Register  to view this content.
    Last edited by zbor; 04-06-2015 at 03:22 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,861

    Re: Searching cells in multiple worksheets

    You test
    Please Login or Register  to view this content.
    no matter what is in that cell it is either diffrent from "" or different from "New Team Name" (orsometimes different from both). So the crriteria is always true and you always get first Msgbox

    The solution: Test
    Please Login or Register  to view this content.
    and the same way other criteria.
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    09-22-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Office 2019
    Posts
    310

    Cool Re: Searching cells in multiple worksheets

    Works a treat thanks Kaper!

+ 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. Searching multiple Worksheets Excel 07
    By G4f4ruis in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-22-2011, 08:17 PM
  2. Searching Multiple Worksheets for Multiple Entries & Combining into one worksheet
    By Nick_Butler in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2009, 10:48 AM
  3. Searching multiple worksheets
    By Sasha9876 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-30-2008, 06:16 AM
  4. searching multiple worksheets
    By sonic-the-mouse in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-03-2006, 05:45 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