+ Reply to Thread
Results 1 to 2 of 2

Search range macro change

  1. #1
    Registered User
    Join Date
    09-09-2018
    Location
    Vancouver, canada
    MS-Off Ver
    2010
    Posts
    76

    Search range macro change

    Hi

    I have a macro, below, that works just fine but I was wondering if it’s possible to add one additional condition to it. If someone could just look to see if this is possible I would be very grateful.

    - The code searches the ranges C21:C35,P38:P52,Z40:Z60,AE40:AE75 (sample data ranges) for any sets of numbers such as 1-11, 15- 5, 20-5 etc.
    - The code then moves the found set of numbers down one cell. As an example if there is a 1-1 in cell C21 the code would move it to cell C22 and the last number in the set would be increased by one to 1-2 (only the last number increases by one).

    My question is can a condition be added that checks if the last number in the set is a 10 (could be any number 1–10, 4-10, 20-10 etc) the code would move only that set down two cells instead of one cell. So as an example if cell P38 has a 1-10 the code would move it to cell P40 and the expected result would be 1-11. All other set of numbers would continue to move down one cell only.

    If you have any questions please ask me.

    Thank-you for any help.

  2. #2
    Registered User
    Join Date
    09-09-2018
    Location
    Vancouver, canada
    MS-Off Ver
    2010
    Posts
    76

    Re: Search range macro change

    Hi

    This post can be closed i have solved the problem myself.
    thank-you

+ 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. Change search number in my macro
    By scott1945 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-17-2018, 02:32 PM
  2. Change search range and search criteria in my code
    By scott1945 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-10-2018, 02:53 PM
  3. [SOLVED] Change On_Open macro to a cell change in a range of cells
    By davidpierce in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-27-2015, 02:46 PM
  4. Search range for value and change to a value
    By 951Michael in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-14-2014, 02:25 PM
  5. Creating search box in cell - Currently using Macro 'Range to search' *HELP*
    By jacko058 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-14-2014, 05:24 AM
  6. CAN YOU DYNAMICALY CHANGE VLOOKUP SEARCH RANGE?
    By njuneardave in forum Excel General
    Replies: 3
    Last Post: 06-21-2006, 02:45 PM
  7. [SOLVED] Macro to change value 2 cols over from search
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-27-2005, 05: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