+ Reply to Thread
Results 1 to 10 of 10

Value selection in 2011 Mac excel

  1. #1
    Registered User
    Join Date
    09-13-2015
    Location
    new york city
    MS-Off Ver
    2011 for Mac
    Posts
    5

    Value selection in 2011 Mac excel

    Hi Everyone!

    Here's what I am trying to do:

    I would like to have all cells containing a certain value, to become highlighted (or distinguished), when ANY cell with said value is selected.
    So for example:

    Clicking any cell containing "apples" would cause all cells containing "apples" to become highlighted or distinguished.
    I don't want to have to search for, or use conditional formatting every time.


    Thanks for the help and looking forward to all the great info around here.

    Robert

  2. #2
    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
    53,050

    Re: Value selection in 2011 Mac excel

    Hi, welcome to the forum

    I think you wuill need VBA for that, not sure how good VBA for mac is
    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

  3. #3
    Registered User
    Join Date
    09-13-2015
    Location
    new york city
    MS-Off Ver
    2011 for Mac
    Posts
    5

    Re: Value selection in 2011 Mac excel

    Quote Originally Posted by FDibbins View Post
    Hi, welcome to the forum

    I think you wuill need VBA for that, not sure how good VBA for mac is

    Thanks FDibbins! I will try this and see what I get. And yeah, I am trying out excel on Mac for the first time and it is a pain!

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,976

    Re: Value selection in 2011 Mac excel

    Windows version:
    Please Login or Register  to view this content.
    Ben Van Johnson

  5. #5
    Registered User
    Join Date
    09-13-2015
    Location
    new york city
    MS-Off Ver
    2011 for Mac
    Posts
    5

    Re: Value selection in 2011 Mac excel

    Hi protonLeah,


    Thanks for much for answering!

    What specific parts of this would i have to modify to suit my actual data?

    For example, If I'm simply just trying to make a cell with "apples" once clicked, cause all others to become highlighted.

    I'm new to this and trying to teach myself, and don't even know where to start with all of that code.

    Would it be easier to create a button when once clicked, caused all cells with "apples" to become distinguished?

    Thanks!

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,976

    Re: Value selection in 2011 Mac excel

    I don't have a Mac. I'm assuming it's similar to the PC:

    With a PC there are two ways to access the VB editor

    First way:
    Click the Developer Tab on the ribbon
    Click "Visual Basic" to start the VB editor

    Alternative:
    Right click the sheet tab and select "View Code"

    Once the VB editor is running:
    * In the project pane (left pane) double click the sheet where you want to put the code
    * Paste the code into the code pane (right)

    save the workbook and close the VB editor.

    -------------------------------
    The code that I posted looks for the all cells whose content match the clicked/selected cell. The values to find are not hard coded in the macro so it does not need any mod for that. However, I assumed that the cells would start at cell A1 and down and over for several cells all with cell A1 as the top left corner of the block.

    If you click a cell in the block it will find all other cells that have the exact same contents of the selected cell.

    The macro is a 'selection change' macro that runs whenever a new cell on that specific sheet is selected.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-13-2015
    Location
    new york city
    MS-Off Ver
    2011 for Mac
    Posts
    5

    Re: Value selection in 2011 Mac excel

    Quote Originally Posted by protonLeah View Post
    I don't have a Mac. I'm assuming it's similar to the PC:

    With a PC there are two ways to access the VB editor

    First way:
    Click the Developer Tab on the ribbon
    Click "Visual Basic" to start the VB editor

    Alternative:
    Right click the sheet tab and select "View Code"

    Once the VB editor is running:
    * In the project pane (left pane) double click the sheet where you want to put the code
    * Paste the code into the code pane (right)

    save the workbook and close the VB editor.

    -------------------------------
    The code that I posted looks for the all cells whose content match the clicked/selected cell. The values to find are not hard coded in the macro so it does not need any mod for that. However, I assumed that the cells would start at cell A1 and down and over for several cells all with cell A1 as the top left corner of the block.

    If you click a cell in the block it will find all other cells that have the exact same contents of the selected cell.

    The macro is a 'selection change' macro that runs whenever a new cell on that specific sheet is selected.
    Thanks so much for taking the time to help me with this!

    I followed these steps and it doesn't seem like the macro is running.

    I checked to make sure everything was identical between your example and mine.

    This is a copy of the excel I'm trying to get this to work in:

    Maybe you could take a look? I'm starting to think it's a Mac issue.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,976

    Re: Value selection in 2011 Mac excel

    1. I forgot to mention that you have to save the workbook as xlsm not xlsx.
    2. The original code was written as a guess at what your sheet looked like.

    The modified code works on the sample provided:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    09-13-2015
    Location
    new york city
    MS-Off Ver
    2011 for Mac
    Posts
    5

    Re: Value selection in 2011 Mac excel

    Quote Originally Posted by protonLeah View Post
    1. I forgot to mention that you have to save the workbook as xlsm not xlsx.
    2. The original code was written as a guess at what your sheet looked like.

    The modified code works on the sample provided:
    Please Login or Register  to view this content.
    Thanks protonLeah, your a real wizard.

    It looks like "If Target.Count > 1 Or Target.Value = "" Then Exit Sub" is the part you changed.

    How would I go about making it so that selecting a cell with a name in it like "Donnie" would highlight all others regardless of the other data in the cell (in this case the time frame ex: 8:00-8:30 and 12:30-1:00).

    My end goal is to be able to select a cell with a client name ex: Donnie, and have all appear highlighted, regardless of the other data in the cell.

    Do you think it would be easier to create buttons for all the different clients, and create a macro so that once a button is selected, it will cause all cells with the given client name to become highlighted, regardless of time or other data in cell?

    Also, I'm kind of blown away by the help you've been giving me. I would love to reimburse you somehow.

  10. #10
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,976

    Re: Value selection in 2011 Mac excel

    Rather than buttons I added the sheet "Clients" with Dynamic named range "ClientList" and used Data Validation in cell E1.
    The code is modified to look for that name.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by protonLeah; 09-16-2015 at 08:42 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. Mac 2011 Data validation with multiple list selection
    By rickycr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-06-2015, 08:55 PM
  2. [SOLVED] VBA 2010 / VBA 2011 search/find function won't work in 2011 (MAC)
    By lafanker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-22-2014, 09:02 AM
  3. [SOLVED] Macro/vba to change date format from 01.01.2011 to 01/01/2011
    By Darrenh1238 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-20-2012, 07:42 PM
  4. Excel Mac 2011 VBA
    By e1504 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-24-2012, 02:38 PM
  5. Replies: 0
    Last Post: 03-19-2012, 07:32 PM
  6. Convert Date - 8/29/2011 to 2011.08.29
    By artiststevens in forum Excel General
    Replies: 4
    Last Post: 08-29-2011, 06:10 AM
  7. Help with Date Macros - eg. Change Values From Jun 5, 2011 to 05/06/2011
    By Red2Black in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-14-2011, 08:44 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