Solved

compare excel values, not the formula

Posted on 2011-03-21
2
323 Views
Last Modified: 2012-08-13
Hi,

Ive got an excel macro that compares 2 sources (sheet 1 as source 1, sheet 2 as source 2). The problem Im having is that Im pulling the data from both sources using the same formula in both sheets and when my macro tries to compare it says there are no differences even though the values in the cells are different (the formula to derive the value in the cell is the same)

Ive attached the macro as a file

Cheers
macro.txt
0
Comment
Question by:DiCanio13
2 Comments
 
LVL 50

Accepted Solution

by:
Dave Brett earned 500 total points
ID: 35186496
Rather than

cf1 = ws1.Cells(r, c).FormulaLocal
cf2 = ws2.Cells(r, c).FormulaLocal

try this

Dave

cf1 = ws1.Cells(r, c).Value
cf2 = ws2.Cells(r, c).Value

Open in new window

0
 

Author Closing Comment

by:DiCanio13
ID: 35186598
Cheers thats great
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question