View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default conditional formula or macro

I would suggest that in Sheet1 you join the model and serial columns
together in a helper column, eg. put this in G2:

=E2&F2

and copy down. Then in your new sheet you could have a MATCH formula
along these lines in A2:

=MATCH(Sheet2!A2&Sheet2!B2,Sheet1!G$2:G$1000,0)

to find an exact match, and then this formula in B2:

=IF(ISNA($A2),"",INDEX(Sheet1!A$2:A$1000,$A2,0))

Copy B2 into C2:E2 and then copy A2:E2 down for as many entries as you
have in Sheet2.

Hope this helps.

Pete


On Jan 29, 7:36*pm, pm wrote:
I am trying to compare two columns in two different worksheets. *If the cell
in column model and serial *worksheet #2 matches the cell in column Model and
serial worksheet #1, then I want to pull data from column A, B, C, and D from
worksheet #1 into a separate sheet. *Help please. *

Worksheet #1
A * * B * * * * * * C * * * * * D * * * * * * * * * * *Model * * * * * Serial
801 Beaumont 7194629 E32696R36 * * * C2405 * * *PSPSV05008
805 Houston * *7764192 E-062306CRR * TM233XC * *LXT21051803284
801 Beaumont 7618786 E32215R24 * * * TM243XC * *LXT3005347347

Worksheet #2

Model # Serial #
32HL67 * * * * * * * * *AM339004740 * * * *
32HL67U * * * * * * * * AM379011491 * * * *
32HL67U * * * * * * * * AM37010883 * * * * *
32HL67U * * * * * * * * AM37021155 * * * * *
32HL67U * * * * * * * * AM37011550 * * * * *
32HL67U * * * * * * * * AM379011448 * * * *
32LC7D * * * * * * * * *708MXTC4Y105 * * * *
32LC7D * * * * * * * * *706MCMT0M499 * * * *