PDA

View Full Version : Macro to copy result based o criteria



arnab0711
08-13-2012, 03:06 AM
Hi,
I have this workbook there are two sheets(master and source)
In the master sheet there is a text box against card number,I want a macro that will copy details from source sheet to the four columns(C,D,E,F) in the master sheet.

Bob Phillips
08-13-2012, 03:18 AM
No need for VBA, just get rid of the text box, put the card number in D3 and use these formulas

=IFERROR(INDEX(Sheet1!D:D,MATCH($D$3,Sheet1!$E:$E,0)),"")
=IFERROR(INDEX(Sheet1!G:G,MATCH($D$3,Sheet1!$E:$E,0)),"")
=IFERROR(INDEX(Sheet1!I:I,MATCH($D$3,Sheet1!$E:$E,0)),"")
=IFERROR(INDEX(Sheet1!S:S,MATCH($D$3,Sheet1!$E:$E,0)),"")