Consulting

Results 1 to 3 of 3

Thread: Refresh custom formulars that checks background color and output as 1 or 0 (File here

  1. #1

    Question Refresh custom formulars that checks background color and output as 1 or 0 (File here

    Hey guys!

    I'm currently struggling with a small formating code and like to refresh a row of formulas that have a macro for background color check in them.
    Unfortunately the refreshing methodes that I found only refresh if a cell value changes, not the background color. I also want to change True and False to 1 and 0 somehow.

    Table.jpg
    Code.jpg

    Sheet1.xlsm

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,872
    Quote Originally Posted by Schutzhofer View Post
    Unfortunately the refreshing methodes that I found only refresh if a cell value changes, not the background color.
    Yes that's true, I think the best you can do is to do it on selection change as you've attempted but use:
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    ActiveSheet.EnableCalculation = False
    ActiveSheet.EnableCalculation = True
    End Sub
    Quote Originally Posted by Schutzhofer View Post
    I also want to change True and False to 1 and 0 somehow.
    Just put a double negative (I think it's called a double unary) in front of the function:
    =--IsCellColour(A13)
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    Quote Originally Posted by p45cal View Post
    Yes that's true, I think the best you can do is to do it on selection change as you've attempted but use:
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    ActiveSheet.EnableCalculation = False
    ActiveSheet.EnableCalculation = True
    End Sub
    Just put a double negative (I think it's called a double unary) in front of the function:
    =--IsCellColour(A13)
    Yes absolutely. And yes it works like a charm, just like I wanted.
    I can extend on that, thank you!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •