LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Macro to compare columns and output the results

Hi,

I have another question.

I'm comparing two pairs of columns (Column D with E, Column F with G. The
data in these are vlookup-ed from other sheets) and putting down the
comparison results in Column H.

If Column D & E matches, Column F & G matches = Column H results: "ID
matches, number of files matches"
If Column D & E matches, Column F & G does NOT match = Column H results:
"ID matches, number of files does NOT match"
If Column D & E does NOT match, Column F & G match = Column H results: "ID
does NOT match, number of files matches"
If Column D & E does NOT match, Column F & G does NOT match = Column H
results: "ID does NOT match, number of files does NOT match"

If EITHER Column D & E is #N/A.... instead of "ID does not match" substitute
with "ID contains #N/A" in the results in Column H. Same for Column F & G, if
#N/A is present, substitute "Number of files does not match" with "Number of
files contains #N/A". So in Column H there will also be combinations like "ID
matches, number of files contains #N/A", "ID contains #N/A, number of files
does NOT match", and so on.

Using EXACT with much filtering/sorting can do the job, but it would be
great if this can be done with a macro :-)

TIA

Beth
 
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
Lookup 2 columns of data, perform, match, output results John Excel Worksheet Functions 2 September 26th 08 11:30 AM
Compare 2 Columns, then output a list JohnHB Excel Programming 3 May 31st 07 09:46 PM
how to compare two columns and get a output from it [email protected] Excel Worksheet Functions 3 July 5th 06 08:19 AM
Compare 2 columns and output to a 3rd column jamaican jewel Excel Discussion (Misc queries) 1 March 22nd 06 09:26 PM
Macro to match output from 2 columns... [email protected] Excel Programming 5 July 16th 04 08:39 PM


All times are GMT +1. The time now is 02:30 PM.

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"