+ Reply to Thread
Results 1 to 9 of 9

Want macro to run and if there is no matching criteria move on.

  1. #1
    Registered User
    Join Date
    08-02-2020
    Location
    USA
    MS-Off Ver
    10
    Posts
    24

    Want macro to run and if there is no matching criteria move on.

    I have a grocery list I input my on hand quantity and I leave all the cells that I do not have product on hand blank.

    I have the following Macro made:

    Please Login or Register  to view this content.
    If there are no blank cells in any of the ranges I get an error... I would like to know the missing piece to tell the macro if there is no blank cell to fill in with a 0 in the requested range to move on to the next line of the script until script is completed.

    Please let me know if there is any additional data I can provide. Thank you!
    Last edited by AliGW; 12-31-2020 at 08:09 PM.

  2. #2
    Forum Contributor
    Join Date
    01-25-2013
    Location
    near Philly, PA USA
    MS-Off Ver
    Excel 2019
    Posts
    178

    Re: Easy Fix - I am very new! Want macro to run and if there is no matching criteria move

    Attach sample workbook as described in yellow box for best/any help.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Easy Fix - I am very new! Want macro to run and if there is no matching criteria move

    Try:

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Easy Fix - I am very new! Want macro to run and if there is no matching criteria move

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional.)

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,029

    Re: Easy Fix - I am very new! Want macro to run and if there is no matching criteria move

    Removed due to moderation issue

  6. #6
    Registered User
    Join Date
    08-02-2020
    Location
    USA
    MS-Off Ver
    10
    Posts
    24

    Re: Easy Fix - I am very new! Want macro to run and if there is no matching criteria move

    Thank you for the detailed explanation on proper formatting and my apologies.

  7. #7
    Registered User
    Join Date
    08-02-2020
    Location
    USA
    MS-Off Ver
    10
    Posts
    24

    Thank you for all the help

    Thank you for all the help. Closing this thread and starting new one.
    Last edited by superCWdad; 12-31-2020 at 10:20 PM. Reason: moved to new thread per TMS

  8. #8
    Registered User
    Join Date
    08-02-2020
    Location
    USA
    MS-Off Ver
    10
    Posts
    24

    Re: Easy Fix - I am very new! Want macro to run and if there is no matching criteria move

    TMS, Thank you for your time and expertise assisting me with this issue.

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Want macro to run and if there is no matching criteria move on.

    You're welcome.

    The Links issue is probably nothing to do with your existing code. I would recommend that you mark this thread as solved and start a new one for the new question.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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 Dividing Values Based upon Matching Criteria and Description Criteria
    By pvsvprasad in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 09-18-2016, 12:39 PM
  2. Matching inverted values (easy)
    By Nickopopolo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-24-2016, 01:13 PM
  3. [SOLVED] Macro to Move Rows to New Worksheets Based on Criteria & Then HIDE & Move Back
    By abro0821 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-22-2014, 04:00 PM
  4. Replies: 12
    Last Post: 02-21-2013, 12:55 PM
  5. Move Rows of Data from a Specific Column (Based on Matching Criteria) to a new Sheet
    By jordan1214 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-21-2013, 02:30 AM
  6. Macro to Move Data Within a Row if Criteria is Met
    By MSmithson in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 03-14-2011, 05:09 PM
  7. is there an easy way to move parts of cells around
    By jvoortman in forum Excel General
    Replies: 0
    Last Post: 01-21-2005, 08:06 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