+ Reply to Thread
Results 1 to 3 of 3

How to Compare formulas???

  1. #1
    Registered User
    Join Date
    05-12-2008
    Posts
    40

    How to Compare formulas???

    Is there a formula or VB code that will compare formulas in two different cells and not compare the return value.

    For example

    A1 contains =SUM(E1:E3) and returns 10
    B1 contains =SUM(E1:E3) and returns 20
    C1 contains =SUM(F1:F3) and returns 10

    D1 will include a formula that will compare the formulas within A1 and B1 and return a TRUE value as the two formulas are identical even though the returned values are different (10 and 20).
    D2 will compare the formulas with A1 and C1 and return a FALSE value as the formulas are different even though the returned values are identical.

    Hope that is enough explanation and thanks for any solutions or tips.

    thanks
    Arfan
    Last edited by arfanvilla; 10-15-2008 at 09:09 AM.

  2. #2
    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
    Please Login or Register  to view this content.
    Regards Mick

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