Pistoleiro
New Member
- Joined
- Nov 18, 2008
- Messages
- 34
Hi All,
I have this rediculously long array formula to check whether certain data matchs, Below is the formula however I'm trying to get vba to enter this into cell O3 I'd rather not enter the formula as a normal formula then use send keys but at this point I'm running out of options.
Also if we can avoid using R1C1 reference style that would be helpful as I believe I'd have to do a rewrite of the rest of the workbook to get that to work.
Any ideas?
Thanks very much
=IF(ISERROR(IF(VLOOKUP(H3&IF(G3="EUR","RSAD","RSAB")&D3,A:J,10,FALSE)=(SUM(IF($D$2:$D$14=D3,IF(H3=$H$2:$H$14,IF(I3=$I$2:$I$14,$J$2:$J$14,0),0),0))-VLOOKUP(H3&IF(G3="EUR","RSAD","RSAB")&D3,A:J,10,FALSE)),"OK","CHECK")),"",IF(VLOOKUP(H3&IF(G3="EUR","RSAD","RSAB")&D3,A:J,10,FALSE)=(SUM(IF($D$2:$D$14=D3,IF(H3=$H$2:$H$14,IF(I3=$I$2:$I$14,$J$2:$J$14,0),0),0))-VLOOKUP(H3&IF(G3="EUR","RSAD","RSAB")&D3,A:J,10,FALSE)),"OK","CHECK"))
I have this rediculously long array formula to check whether certain data matchs, Below is the formula however I'm trying to get vba to enter this into cell O3 I'd rather not enter the formula as a normal formula then use send keys but at this point I'm running out of options.
Also if we can avoid using R1C1 reference style that would be helpful as I believe I'd have to do a rewrite of the rest of the workbook to get that to work.
Any ideas?
Thanks very much
=IF(ISERROR(IF(VLOOKUP(H3&IF(G3="EUR","RSAD","RSAB")&D3,A:J,10,FALSE)=(SUM(IF($D$2:$D$14=D3,IF(H3=$H$2:$H$14,IF(I3=$I$2:$I$14,$J$2:$J$14,0),0),0))-VLOOKUP(H3&IF(G3="EUR","RSAD","RSAB")&D3,A:J,10,FALSE)),"OK","CHECK")),"",IF(VLOOKUP(H3&IF(G3="EUR","RSAD","RSAB")&D3,A:J,10,FALSE)=(SUM(IF($D$2:$D$14=D3,IF(H3=$H$2:$H$14,IF(I3=$I$2:$I$14,$J$2:$J$14,0),0),0))-VLOOKUP(H3&IF(G3="EUR","RSAD","RSAB")&D3,A:J,10,FALSE)),"OK","CHECK"))