Results 1 to 10 of 26

Thread: Macro to check values based on certain text

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi

    Howard,

    Please add code tags while posting code. This time I added for you.

    this line
    Code:
    Evaluate("sumproduct(--(abs(" & myRange.Address(external:=1) & ")>0.0001)," & myRange.Address(external:=1) & ")")
    should write as
    Code:
    If Evaluate("sumproduct(--(abs(" & myRange.Address(external:=1) & ")>0.0001)," & myRange.Address(external:=1) & ")")  Then
    also add an End If after Next i
    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)

  2. #2
    Senior Member
    Join Date
    Apr 2012
    Posts
    193
    Rep Power
    14
    Thanks for the help, much appreciated

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

    I picked up that if the first value in say column B in line with the text "check" is negative, the row number is not displayed. However, if postive the row number is displayed. It would be appreciated if you could amend the code to incorporate this

  4. #4
    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

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
  •