+ Reply to Thread
Results 1 to 2 of 2

associating rows according to a field

  1. #1
    Registered User
    Join Date
    04-30-2009
    Location
    Provo, Utah
    MS-Off Ver
    Excel 2007
    Posts
    19

    associating rows according to a field

    I am just begining this project, and it is still in the beginning comceptual stages.
    I am creating a weekly report in excel '07 that draws information from an online database.

    In the report, I'm going to be calculating several things from the raw data so I'll have a data tab, and then the front report tab. This is no problem. The issue is that in the report I need to show in red those fields that have changed since last week. Now to do this I can set up a macro that will copy the data in the Current Data tab in to a Past Data tab, then import the new data to the Current Data tab. The trouble comes in comparing the two fields. I could set up conditional formatting, but there may be new rows or the rows may not be in the same order. Each of the projects (rows) has a unique ID number. Is there a way to associate the current data with the past data with the ID and check for changes between them? I know this is a database function, but I need Excel formatting for the report and I want to avoid using Access as a middle man.
    Any thoughts on this?
    Thank you.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: associating rows according to a field

    It's totally doable. I would use INDEX/MATCH to create the crossreference, but Conditional Formatting doesn't work against other sheets unless you use Named Ranges. So that will create an additional step.

    So, let's assume on PastData the Ids are in column A and you name a sufficient size portion of A as IDs (A1:A1000)

    Named Ranges:
    A1:A1000 = IDs
    B1:B1000 = VALUES


    On Sheet1 in the column A1, use this conditional formatting:
    Condition1: Formula Is: =INDEX(Values,MATCH(A1,IDs,0))<>B1
    Format...Pattern...Red


    The ones that DON'T match each week will light up.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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