Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
CP CP is offline
external usenet poster
 
Posts: 64
Default Matching data in two sheets

Hi thanks for reading

I have a project where I need to compare month to month data from two sheets
and then make further calulations

Sheet1 = current month
ColA = Client
Colb = Value

Sheet2 = previous month
ColA = Client
Colb = Value

I require sheet1 ColC to show difference in value from previous month
(sheet2) to current month (sheet1) using the value in ColB but also matching
the customer.
If no customer match show a text value "text"

Many many thanks if you can help me :)
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Matching data in two sheets

One way ..

In Sheet1,
In C2:
=IF(ISNA(MATCH(A2,Sheet2!A:A,0)),"Not
found",B2-INDEX(Sheet2!B:B,MATCH(A2,Sheet2!A:A,0)))
Copy down. Adapt to suit.

High-five? Click YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,500 Files:370 Subscribers:66
xdemechanik
---
"CP" wrote:
I have a project where I need to compare month to month data from two sheets
and then make further calulations

Sheet1 = current month
ColA = Client
Colb = Value

Sheet2 = previous month
ColA = Client
Colb = Value

I require sheet1 ColC to show difference in value from previous month
(sheet2) to current month (sheet1) using the value in ColB but also matching
the customer.
If no customer match show a text value "text"


  #3   Report Post  
Posted to microsoft.public.excel.misc
CP CP is offline
external usenet poster
 
Posts: 64
Default Matching data in two sheets

Many thanks for quick response
thinking a little more logically - if sheet1 contains all my clients in ColA
then B, C, D is the past three months
Assuming sheet2 data goes to col B, sheet3 to C and so on - I could make a
more useful and logical table
Possible? if so how?

I am thinking long term this is more useful

"Max" wrote:

One way ..

In Sheet1,
In C2:
=IF(ISNA(MATCH(A2,Sheet2!A:A,0)),"Not
found",B2-INDEX(Sheet2!B:B,MATCH(A2,Sheet2!A:A,0)))
Copy down. Adapt to suit.

High-five? Click YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,500 Files:370 Subscribers:66
xdemechanik
---
"CP" wrote:
I have a project where I need to compare month to month data from two sheets
and then make further calulations

Sheet1 = current month
ColA = Client
Colb = Value

Sheet2 = previous month
ColA = Client
Colb = Value

I require sheet1 ColC to show difference in value from previous month
(sheet2) to current month (sheet1) using the value in ColB but also matching
the customer.
If no customer match show a text value "text"


  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Matching data in two sheets

Your new query should actually be posted afresh.
It's a different ball game ...

In Sheet1,
List the "other" sheetnames in B1 across, eg: Sheet2, Sheet3, etc
Then place in B2:
=IF(ISNA(MATCH($A2,INDIRECT("'"&B$1&"'!A:A"),0)),0 ,INDEX(INDIRECT("'"&B$1&"'!B:B"),MATCH($A2,INDIREC T("'"&B$1&"'!A:A"),0)))
Copy B2 across/fill down as far as required to populate col B's figures for
the clients listed in A2 down from each of the other sheets (all assumed
identically structured). I've made the "IF not found" return as zeros to
minimize downstream calculation distress, since you probably would be
calculating further from the summarizations that's compiled here. Adapt to
suit.

Celebrate success? Click YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,500 Files:370 Subscribers:66
xdemechanik
---
"CP" wrote:
Many thanks for quick response
thinking a little more logically - if sheet1 contains all my clients in ColA
then B, C, D is the past three months
Assuming sheet2 data goes to col B, sheet3 to C and so on - I could make a
more useful and logical table
Possible? if so how?

I am thinking long term this is more useful


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Matching identical data using data only once in the matching proce Robert 1 Excel Discussion (Misc queries) 1 June 29th 07 04:22 PM
Can I merge data in 2 sheets matching rows of data by last name? Corb Excel Discussion (Misc queries) 1 March 18th 07 05:32 PM
Matching & retrieving data across sheets nd2006 Excel Discussion (Misc queries) 3 August 21st 06 01:52 PM
Matching data and linking it to the matching cell yvonne a via OfficeKB.com Links and Linking in Excel 0 July 13th 05 07:30 PM
Vlook up for matching data in two seperate sheets funky via OfficeKB.com Excel Discussion (Misc queries) 1 June 3rd 05 10:16 PM


All times are GMT +1. The time now is 01:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"