+ Reply to Thread
Results 1 to 5 of 5

find and config calculation cells

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-08-2009
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2003
    Posts
    228

    Question find and config calculation cells

    Hi all,

    I have a command button on a sheet.

    I'd like a macro to scan the workbook and find all cells which contain a function/calculation and then change the colour of the cell.

    Can this be done and if so, how?

    Thank you

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: find and config calculation cells

    ActiveSheet.UsedRange.SpecialCells(-4123).Interior.Color = vbYellow

  3. #3
    Forum Contributor
    Join Date
    04-08-2009
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2003
    Posts
    228

    Re: find and config calculation cells

    That's great!

    How could I apply that to highlight the entire workbook and is there a way to "undo" the highlight?

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: find and config calculation cells

    to highlight the entire workbook
    Dim wsh As Worksheet
    On Error Resume Next
    For Each wsh In ThisWorkbook.Worksheets
        wsh.UsedRange.SpecialCells(-4123).Interior.Color = vbYellow
    Next
    to "undo" the highlight
    Dim wsh As Worksheet
    On Error Resume Next
    For Each wsh In ThisWorkbook.Worksheets
        wsh.UsedRange.SpecialCells(-4123).Interior.Color = xlNone
    Next

  5. #5
    Forum Contributor
    Join Date
    04-08-2009
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2003
    Posts
    228

    Re: find and config calculation cells

    Thank you!

    Absolutely perfect.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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