Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 184
Default Excel VBA. Compare 2 worksheets.

I need to filter to a new workbook for exceptions of potential
mischarges, by comparing
a Table of Actual Charges Vs a Table of Allowed Charges by Employee
and Project.
The Table of Actual Charges may vary, plus or minus for Employees or
Projects.
..

Workbook A Sheet1 - Table of Allowed Charges.
Employee Project W Project X Project Y Project Z
Emp A Y Y
Emp B Y
Y <--- "Y" stands for allowed.
Emp C Y
Emp D
Y
..
Workbook B Sheet1 Table of Actual Charges [With a twist : One new
Employee, One new Project]
Employee Project V Project X Project Y Project Z
Emp A 140 20
Emp B 80 60
20
Emp C 70 90
Emp E 40
120
..

Worbook C Sheet1 Table of Potential Mischarges, resulting from
Workbook B Sheet1
Actual Charges, not matching Workbook A Sheet1 - Table of Allowed
Charges.
Employee Project V Project X Project Y Project Z
Emp B 80 60
Emp C 90
Emp E 40
120
..
From this result table, I would update Workbook A Sheet1, if charges
are justified.
Help appreciated
J.P.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Excel VBA. Compare 2 worksheets.

I'm assuming that in all of your workbooks, your projects are along the top (Row1) , and all
employees along the side(column A).
In workbook C, enter all of your projects and all of your employees: Then in cell B2, enter the
formula

=IF(OR(ISERROR(MATCH(B$1,'[Workbook B.xls]Sheet1'!$1:$1,FALSE)),ISERROR(MATCH($A2,'[Workbook
B.xls]Sheet1'!$A:$A,FALSE))),"",IF(OR(ISERROR(MATCH(B$1, '[Workbook
A.xls]Sheet1'!$1:$1,FALSE)),ISERROR(MATCH($A2,'[Workbook
A.xls]Sheet1'!$A:$A,FALSE))),"",IF(INDEX('[Workbook A.xls]Sheet1'!$1:$10000,MATCH($A2,'[Workbook
A.xls]Sheet1'!$A:$A,FALSE),MATCH(B$1,'[Workbook A.xls]Sheet1'!$1:$1,FALSE))="Y","",INDEX('[Workbook
B.xls]Sheet1'!$1:$10000,MATCH($A2,'[Workbook B.xls]Sheet1'!$A:$A,FALSE),MATCH(B$1,'[Workbook
B.xls]Sheet1'!$1:$1,FALSE)))))

and copy it over and down to match your table. Increase the two references to $1:$10000 to match
your actual number of rows.

HTH,
Bernie
MS Excel MVP


"u473" wrote in message
...
I need to filter to a new workbook for exceptions of potential
mischarges, by comparing
a Table of Actual Charges Vs a Table of Allowed Charges by Employee
and Project.
The Table of Actual Charges may vary, plus or minus for Employees or
Projects.
.

Workbook A Sheet1 - Table of Allowed Charges.
Employee Project W Project X Project Y Project Z
Emp A Y Y
Emp B Y
Y <--- "Y" stands for allowed.
Emp C Y
Emp D
Y
.
Workbook B Sheet1 Table of Actual Charges [With a twist : One new
Employee, One new Project]
Employee Project V Project X Project Y Project Z
Emp A 140 20
Emp B 80 60
20
Emp C 70 90
Emp E 40
120
.

Worbook C Sheet1 Table of Potential Mischarges, resulting from
Workbook B Sheet1
Actual Charges, not matching Workbook A Sheet1 - Table of Allowed
Charges.
Employee Project V Project X Project Y Project Z
Emp B 80 60
Emp C 90
Emp E 40
120
.
From this result table, I would update Workbook A Sheet1, if charges
are justified.
Help appreciated
J.P.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 184
Default Excel VBA. Compare 2 worksheets.

Ok, it works fine, thank you. I was worried with that long formula. I
am impressed.
Of Course, in my Workbook C, before entering your formula, I had
entered all new Employees and Projects.
In actual practice, how would I filter all new Employees in Col. A
and new Projects in Row 1 in Workbook B to update Workbook A before I
read the resulting exceptions in Workbook C.
Thank you again,

J.P.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Excel VBA. Compare 2 worksheets.

Perhaps, only put the employees and projects of interest into workbook C....

HTH,
Bernie
MS Excel MVP


"u473" wrote in message
...
Ok, it works fine, thank you. I was worried with that long formula. I
am impressed.
Of Course, in my Workbook C, before entering your formula, I had
entered all new Employees and Projects.
In actual practice, how would I filter all new Employees in Col. A
and new Projects in Row 1 in Workbook B to update Workbook A before I
read the resulting exceptions in Workbook C.
Thank you again,

J.P.



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
Can I compare two worksheets using Excel? Cecilia Excel Worksheet Functions 5 August 31st 06 08:58 PM
Excel VBA Macro to compare 2 worksheets for same values [email protected] Excel Worksheet Functions 0 August 23rd 06 04:35 PM
Compare 2 similar excel worksheets Nadia Excel Worksheet Functions 3 July 28th 06 02:20 PM
How to file compare Excel worksheets wrdennig New Users to Excel 3 April 21st 06 02:28 AM
How do I compare two Excel worksheets for cell differences? jjrhiv Excel Discussion (Misc queries) 1 October 25th 05 06:58 PM


All times are GMT +1. The time now is 07:21 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"