View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John V[_2_] John V[_2_] is offline
external usenet poster
 
Posts: 33
Default Convert Excel Formula to VBA

Dear experts,

My active sheet is P1, from which I have found an id value. I now wish to
'get' a value (let's call it maxpt) which is on another sheet (Summary). If I
were doing this in an Excel formula, the cell would contain the following:

=IF(ISNA(MATCH(D6,Summary!D2:D90,0)),"",OFFSET(Sum mary!D2,MATCH(D6,Summary!D2:D90,0)-1,1))

where D6 is the id value and the result would be maxpt. How, if at all, does
this convert to VBA? And can I use a VBA variable in place of the 'D6'?

Thanks!