+ Reply to Thread
Results 1 to 8 of 8

Detect numbers in a cell range and then change cells based on what numbers are found

  1. #1
    Registered User
    Join Date
    02-27-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    2

    Detect numbers in a cell range and then change cells based on what numbers are found

    Attached is a spreadsheet to help explain, but what I've got is I'm going to be using a spreadsheet to keep track of where different people are at. So if Person 1 is in Room 3, I will stick a 3 in the box next to their name and then can look at the spreadsheet whenever I need and see what room they are in. When I'm deciding what room to put a person in, though, I need to be able to quickly glance at a list of Room #'s and see what one's are still available. So I have a bank of Room #'s in the spreadsheet....1,2,3, etc.

    What I'd like, is some way to set this up so that when I put, for example, "3" in the cell next to "Person 1" the spreadsheet automatically removes "3" from the bank of available Room #'s and when I delete the "3" because the person has left, it adds "3" back to the bank of available Rooms. Is there any way to do this? I'm not an excel veteran at all, sorry. I don't know enough to even know what I should be searching for. Any advice would be appreciated.

    Thanks a ton in advance!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Detect numbers in a cell range and then change cells based on what numbers are found

    Hi,

    Might I suggest conditional formatting?

    Take a look. When a room number is allocated, the value isn't removed, but the text colour is changed to white so that you can't see it.

    I hope this helps

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Detect numbers in a cell range and then change cells based on what numbers are found

    Hi and welcome to the forum

    Try this suggestion. 1st, put all your numbers in a table off to the side (I used L3:P5), then in F3, copied down and across, use this...
    =IF(ISERROR(VLOOKUP(L3,$C$3:$C$18,1,0)),L3,"")

    adjust ranges as needed

    edit: good idea on using CF, AJ
    Last edited by FDibbins; 02-27-2014 at 07:50 PM.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Detect numbers in a cell range and then change cells based on what numbers are found

    I'm a little late, but I figured I'd throw my hat in the ring if you wanted something a little fancier. Attached is how to do it using dynamic named ranges with data validation.
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Registered User
    Join Date
    02-27-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    2

    Re: Detect numbers in a cell range and then change cells based on what numbers are found

    Wow, thank you all for the help. I would have never thought of some of the ways you did it, and with your direction I was able to do it. Thanks a million! I learned a lot about excel as I tinkered through that. Amazing what you can do if you know how.

  6. #6
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Detect numbers in a cell range and then change cells based on what numbers are found

    No problems Happy to help.

    Please don't forget to mark this thread as solved

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Detect numbers in a cell range and then change cells based on what numbers are found

    Here is another way to have a Drop Down list of the rooms that eliminates the rooms taken.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  8. #8
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Re: Detect numbers in a cell range and then change cells based on what numbers are found

    Best way I could think of ------->

    Change the BLUE cells... and the used rooms will automatically be grayed-out!

    This code is placed in Sheet1
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Xx7; 02-27-2014 at 11:03 PM.

+ 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] Detect when all cells in a range change value
    By ozizushi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2014, 12:09 PM
  2. [SOLVED] Looking at specific range of numbers and returning the highest found
    By SteinerKD in forum Access Tables & Databases
    Replies: 6
    Last Post: 02-26-2013, 10:10 PM
  3. [SOLVED] Change text of one cell based on the numbers of a range of cells?
    By spookymyo in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-18-2013, 04:50 PM
  4. change cell formula based on first 2 numbers of another
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-21-2009, 07:16 PM
  5. [SOLVED] change 2000 cells (negative numbers) into positive numbers
    By lisbern in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-16-2006, 01:00 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