Exchanging an Excel formula with some VB code
I have a formual I'm using right now that I would like to replace with some
code. Here is the formula:
=IF(D2=D1,"",IF(ISERROR(VLOOKUP($D2,'XXX
DeleteCodes'!$1:$65536,2,FALSE)),"",VLOOKUP($D2,'X XX
DeleteCodes'!$1:$65536,2,FALSE)))
I repeat that formula about 1500 times to account for most circumstances but
on occasion I need more than 1500 lines so I'd like to move this formula to
VBA code.
The deletecodes sheet contains the following data type:
X561999 DDI DDU LNI LNU OPI DDQ
If the X561999 ID is found on the current sheet then the codes to the right
of the ID is copied into the cell that contains the above formula.
Any suggestions?
|