+ Reply to Thread
Results 1 to 3 of 3

How to calculate only active sheet when using MACRO to highlight selected row

  1. #1
    Registered User
    Join Date
    06-21-2019
    Location
    USA
    MS-Off Ver
    Windows 10
    Posts
    10

    How to calculate only active sheet when using MACRO to highlight selected row

    Hello,

    I found the below MACRO solution which together with conditional formating highlights the selected row. Works perfectly, only that if multiple workbooks are open it will highlight the same exact row on the active sheet of other open workbooks. Is there a way to "calculate" only the active sheet of active workbook and not all open workbooks?

    Please Login or Register  to view this content.
    CF formula: =IF(Cell("row")=row(A1),True,False)

    I implemented this solution because my older solution (below) although it works very well, inactivated the "undo" button on my sheets everytime I selected a new cell and I was looking for a workaround that still allowed me to "undo." I like that in the old solution (below) with multiple workbooks open the last highlighted cell on any active sheet remains unchanged (highlighted) when I select the other workbook or any other program, like having a ruler on the screen to indicate the last selected row.

    Please Login or Register  to view this content.
    Old CF formula: =$A$1=row()
    Last edited by Pepe Le Mokko; 09-06-2019 at 09:22 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: How to calculate only active sheet when using MACRO to highlight selected row

    Hi Peter
    thanks for wrapping code with tags.
    In the future please use code tags ( the #button) instead of HTML tags
    I will change them in your post this time
    Cheers

  3. #3
    Registered User
    Join Date
    06-21-2019
    Location
    USA
    MS-Off Ver
    Windows 10
    Posts
    10

    Re: How to calculate only active sheet when using MACRO to highlight selected row

    Thanks for the clarification.

+ 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] Automatically Highlight the Active or Selected Cell
    By Nirmall in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-12-2015, 06:51 AM
  2. MACRO save active sheet wth name from selected cell and without macros and buttons
    By forfiett in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-26-2013, 04:14 PM
  3. [SOLVED] Highlight active cell, un-highlight when no longer active?
    By cdterry in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2013, 02:39 PM
  4. [SOLVED] Highlight Yellow Active Row, PROBLEM: row selected before closing stays yellow
    By NumberCruncher311 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-12-2013, 07:01 PM
  5. Highlight Active Row macro, and Bold the Active Cell
    By StudentTeacher in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2013, 07:43 PM
  6. [SOLVED] How to highlight an active row within a selected range in excel
    By jjin in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-05-2013, 08:52 PM
  7. Highlight Active Row macro error
    By rasmus1166 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-04-2011, 08:46 AM

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