mrexcelhelp123
New Member
- Joined
- Mar 10, 2010
- Messages
- 38
Hi There!
I have a workbook where I need a cell to be populated in an array of worksheets I specfiy, with below function:
=IF(ISNA(VLOOKUP($C$3&" * ",'Y:\ttd\January 2010\[Jan_costs.xlsx]revdata'!$A$11:$AA$1239,5,0))=TRUE,"",VLOOKUP($C$3&" * ",'Y:\ttd\January 2010\[Jan_costs.xlsx]revdata'!$A$11:$AA$1239,5,0))"
This function performs a vlookup in another workbook.
This is what I thought I could do but I keep getting a data mismatch error. I'm a novice VBA user so I'm sure that I'm doing something obviously wrong. Thanks.
Sheets(Array("NAT", "MCHS")).Select
Range("C2").Select
ActiveCell.Formula = "=IF(ISNA(VLOOKUP($C$3&" * ",'Y:\ttd\January 2010\[Jan_costs.xlsx]revdata'!$A$11:$AA$1239,5,0))=TRUE,"",VLOOKUP($C$3&" * ",'Y:\ttd\January 2010\[Jan_projcosts.xlsx]revdata'!$A$11:$AA$1239,5,0))"
I have a workbook where I need a cell to be populated in an array of worksheets I specfiy, with below function:
=IF(ISNA(VLOOKUP($C$3&" * ",'Y:\ttd\January 2010\[Jan_costs.xlsx]revdata'!$A$11:$AA$1239,5,0))=TRUE,"",VLOOKUP($C$3&" * ",'Y:\ttd\January 2010\[Jan_costs.xlsx]revdata'!$A$11:$AA$1239,5,0))"
This function performs a vlookup in another workbook.
This is what I thought I could do but I keep getting a data mismatch error. I'm a novice VBA user so I'm sure that I'm doing something obviously wrong. Thanks.
Sheets(Array("NAT", "MCHS")).Select
Range("C2").Select
ActiveCell.Formula = "=IF(ISNA(VLOOKUP($C$3&" * ",'Y:\ttd\January 2010\[Jan_costs.xlsx]revdata'!$A$11:$AA$1239,5,0))=TRUE,"",VLOOKUP($C$3&" * ",'Y:\ttd\January 2010\[Jan_projcosts.xlsx]revdata'!$A$11:$AA$1239,5,0))"