+ Reply to Thread
Results 1 to 3 of 3

How to Compare formulas???

Hybrid View

  1. #1
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650
    Hi, This UDF seems to work:-
    Right click sheet tab, select, "View Code"
    VB Window appears, Click "Insert","Module" on toolbar.
    Paste Code in New Window.
    Enter Function in sheet as :- oFm(rng1,rng2)
    NB:-(rng1/2 = Your cell selection)
    Return Value = "True", "False" or Nothing if there is No formula
    Function oFm(rng1 As Range, rng2 As Range) As String 
    If rng1.HasFormula = True And rng1.Formula = rng2.Formula Then
        oFm = "True"
    ElseIf rng1.HasFormula = False Then
        oFm = ""
    Else
        oFm = "False"
    End If
    End Function
    Regards Mick

  2. #2
    Registered User
    Join Date
    05-12-2008
    Posts
    40
    You my friend are an absolute legend, thank you.

    I can now also use this in the conditional formatting.

+ 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. Cut-and-paste breaks dependant formulas
    By DanielHutchison in forum Excel General
    Replies: 1
    Last Post: 07-11-2008, 04:50 PM
  2. Copying "IF" formulas
    By THORPLBG in forum Excel General
    Replies: 2
    Last Post: 02-15-2008, 11:33 AM
  3. Copying EXACT formulas from another page
    By goofy78270 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-23-2007, 11:43 AM
  4. Formulas in a cell don't work as formulas.
    By Lyle McElhaney in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-01-2007, 05:04 AM
  5. copying formulas through vb
    By kostas in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-22-2007, 10:44 AM

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