Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: Macro to check values based on certain text

  1. #21
    Senior Member
    Join Date
    Apr 2012
    Posts
    193
    Rep Power
    14
    Hi Admin

    Attached please find sample data. When activating the macro and there is only one value being a debit in the same row as the text check, it is not shown in the message box. All values that are not zero, except values that are more or less than 5 dicimal places are to be shown-see sample data, B52, which is not shown in message box
    Attached Files Attached Files

  2. #22
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi

    Just remove the ABS part from the formula.
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  3. #23
    Senior Member
    Join Date
    Apr 2012
    Posts
    193
    Rep Power
    14
    Thanks for the help,I removed the ABS part, but the value in cell B52 (-20) is not shown in the message box. If this value is positive, the row number will be displayed ijn the message box

    If I have 20 in B52 and -20 in C52 , then B52 & C52 will be displayed in the message box

    It would be appreciated if you could correct this
    Attached Files Attached Files

  4. #24
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi

    Use this formula.

    If Evaluate("sum(sumif(" & myRange.Address(external:=1) & ",{"">0.00001"",""<0.0001""}))") <> 0 Then
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  5. #25
    Senior Member
    Join Date
    Apr 2012
    Posts
    193
    Rep Power
    14
    Quote Originally Posted by Admin View Post
    Hi

    Use this formula.

    If Evaluate("sum(sumif(" & myRange.Address(external:=1) & ",{"">0.00001"",""<0.0001""}))") <> 0 Then
    Thanks for the help, it would perfectly now.

    I would like to exclude anothetr sheet when checking varianced called "Months". How do I include this. Tried, but could not get it to work

    For Each sh In Worksheets
    If UCase(sh.Name) <> "CONSOLIDATED" Then


    cAddress = ""

  6. #26
    Senior Member
    Join Date
    Apr 2012
    Posts
    193
    Rep Power
    14
    Hi Admin

    Managed to sort out the code

    If UCase(sh.Name) <> "CONSOLIDATED" And UCase(sh.Name) <> "MONTHS" Then
    cAddress = ""

    Regards

    Howard

Similar Threads

  1. Sum values based on multiple criteria
    By Jorrg1 in forum Excel Help
    Replies: 8
    Last Post: 01-07-2013, 03:04 PM
  2. Replies: 10
    Last Post: 12-10-2012, 11:28 PM
  3. Offset based on Values in Column E
    By mrmmickle1 in forum Excel Help
    Replies: 7
    Last Post: 12-04-2012, 10:06 AM
  4. Macro to clear data based on color fill
    By Howardc in forum Excel Help
    Replies: 7
    Last Post: 12-03-2012, 09:25 AM
  5. Loop and Check For Values In Entire Column in Excel
    By Jeff5019 in forum Excel Help
    Replies: 3
    Last Post: 05-01-2012, 10:34 PM

Posting Permissions

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