+ Reply to Thread
Results 1 to 7 of 7

Select cells in one column based on input values in another.

  1. #1
    Forum Contributor
    Join Date
    01-18-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    641

    Select cells in one column based on input values in another.

    Hi All

    I’m trying to select cells in one column based on input values in another. The values are variable and could be input via a series of message boxes.

    For example , in the first message box I would perhaps enter column B.

    The next message box would ask lower and upper numbers. I might enter 25000 and 35000.

    The last message box would ask for input of a second column. I might put column A.

    The macro would then select the cells in A where the number is between 25000 and 35000 in column B.

    Can someone suggest some code to satisfy this?

    Grateful for any help.
    Using Excel , Word and Access 2003 - For the whole of 2024

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Select cells in one column based on input values in another.

    Sounds like a lot of hard work. you need 4 Inputs.

    Try the attached Workbook instead. Click on the button to get started.

    I have not coded for the max number yet. Is it really needed. Let me know.
    Attached Files Attached Files
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,416

    Re: Select cells in one column based on input values in another.

    Quote Originally Posted by CDandVinyl View Post
    For example , in the first message box I would perhaps enter column B.
    What would be in this column... numeric constants or formulas outputting numbers?

  4. #4
    Forum Contributor
    Join Date
    01-18-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    641

    Re: Select cells in one column based on input values in another.

    Hi

    Thanks for your help guys.

    All of the values are numeric constants. There are no formulas involved.


  5. #5
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,416

    Re: Select cells in one column based on input values in another.

    See if this macro does what you want...
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    01-18-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    641

    Re: Select cells in one column based on input values in another.

    Excellent. Worked perfectly first time and does the job exactly. Many Thanks!

    Problem solved!


  7. #7
    Forum Contributor
    Join Date
    01-18-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    641

    Re: Select cells in one column based on input values in another.

    BTW - As I would need to run the code though a few times to cover all of the values in the chosen columns , I added the string and variable names to the message box code so that they would be in place for second and subsequent run-throughs. Just for a little time-saving really.

    This worked fine for these examples :

    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.
    In each of these , the variable used in the first run through is successfully in place , but it doesn't work for this one :

    Please Login or Register  to view this content.
    Is there a way to have the LowUp value input in the first run in place for the second run? It would act as a reminder of the numbers entered in the first run so I can update as need be for the next run.

    I'm grateful again for your help.


+ 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. Replies: 4
    Last Post: 10-17-2017, 01:45 PM
  2. [SOLVED] Macro to select non-contiguous union of cells based on values in other column
    By gutkinma in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-14-2014, 07:41 AM
  3. copy select cells to another tab based on data input into master tab
    By cangert in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-21-2013, 03:12 PM
  4. [SOLVED] input date column A, increment B, select blank cell in D and input time. in a macro
    By jeffstu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2012, 11:19 AM
  5. [SOLVED] Start a macro based on column input values
    By cmm5350 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-02-2012, 10:05 AM
  6. How to start a macro based on column input values
    By cmm5350 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-02-2012, 09:35 AM
  7. select column based on cell input
    By jcfrancisco in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-04-2011, 09:52 AM

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