Perhaps a formulas approach might also work ?
Assume your source sheet is Sheet1,
cols A to C, with answers in col G,
data from row2 down
Cat Dog Cat Not a Moose
Cat Cat Cat Definitely a Cat
Cat Cat Dog Not a Moose2
etc
Answers: "Not a Moose", "Definitely a Cat", etc are in col G
Assume that Sheet2 will be the inputs sheet,
where the corresponding inputs below will be made
in cols A to C, row2 down:
Cat Dog Cat
Cat Cat Cat
Cat Cat Dog
etc
In Sheet3
------------
Assume col A is where we want the answers to be
Put in the formula bar for A2:
=IF(COUNTBLANK(Sheet2!A2:C2)<0,"",IF(ISNA(MATCH(S heet2!A2&Sheet2!B2&Sheet2!
C2,Sheet1!A2:A100&Sheet1!B2:B100&Sheet1!C2:C100,0) ),"",INDEX(Sheet1!G2:G100,
MATCH(Sheet2!A2&Sheet2!B2&Sheet2!C2,Sheet1!A2:A100 &Sheet1!B2:B100&Sheet1!C2:
C100,0))))
Array-enter the formula, i.e. press CTRL+SHIFT+ENTER
instead of just pressing ENTER
Copy A2 down to A100
(can copy down ahead of expected inputs in Sheet2)
Col A will return the corresponding results from col G in Sheet1 for the
inputs made in Sheet2's cols A to C matched against the source data in
Sheet1's cols A to C
If the inputs in cols A to C in Sheet2 are incomplete, or the inputs made do
not match with what's in Sheet1, blanks: "" will be returned
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Michael A" wrote in message
...
Ok, first of all, this community has been so great, and I wanted to thank
you
all. I have a new thing i need to do, and i was wanting to see if anyone
can
help me.
I need a macro that will look at the information on the current sheet, and
compare it to the information on the previous sheet and copy a value.
here is what i need
If any value on the current sheet in column A B and C matches anything on
the previous sheet in column A B and C (The line needs to have all 3
match),
then the macro would copy the value in the G column to the new page.
For example
Sheet 13
A B C G
Cat Dog Cat Not a Moose
then when the macro finds the same ABC on the new sheet, it fills in G for
me.
any help would be great.. Thanks!
|