+ Reply to Thread
Results 1 to 4 of 4

Formula range based on highlighted selection

  1. #1
    Registered User
    Join Date
    12-01-2017
    Location
    Singapore
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2212 Build 16.0.15928.20196) 64-bit
    Posts
    8

    Formula range based on highlighted selection

    Hi,

    I use this macro to highlight the lowest value cell of each row, to show me which number value is the lowest per row at a glance.

    I want to automate this line based on my highlight selection instead of manually changing it each time.

    Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
    "=B2=MIN($B2:$E2)" <-------- (B2 is the first cell, most top left) and (E2 is the most top right cell) out of my highlighted range.


    Basically to use this macro i highlight box all the cells and click this macro.
    It does what this page does except with 1 click on the macro https://www.extendoffice.com/documen...ow-column.html


    Please Login or Register  to view this content.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula range based on highlighted selection

    Why do you need a macro? Why not have the conditional format held permanently for all the rows you are evel likely to need?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Formula range based on highlighted selection

    Hi,

    This should work for your selection
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  4. #4
    Registered User
    Join Date
    12-01-2017
    Location
    Singapore
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2212 Build 16.0.15928.20196) 64-bit
    Posts
    8

    Re: Formula range based on highlighted selection

    I constantly create new workbooks and often use this set of conditional format and i can't seem to create a rule that stay permanent on new workbooks i create.

    Thank you xlnitwit, it works exactly how i wanted it.

+ 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. Automatic range selection based on adjacent formula
    By entoptics in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-01-2015, 09:17 PM
  2. Sum a range of entries based on a multiple selection in a box
    By manueslapera in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-10-2013, 05:30 PM
  3. Replies: 11
    Last Post: 06-29-2012, 08:27 PM
  4. Multiple selection criteria, which formula? .. and selection based on unique numbers
    By FalkirkJim in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2012, 05:22 PM
  5. Hide rows in range 2 based on filter selection in range 1
    By gtol in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-28-2012, 02:09 PM
  6. Highlighting a range based on cell selection
    By a.mack123 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-02-2010, 08:26 AM
  7. Range selection based on adjacent cell range
    By iguss in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-20-2008, 07:57 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