View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
dhstein dhstein is offline
external usenet poster
 
Posts: 266
Default Inserting Formula

=IF(H5<"",VLOOKUP(H5,$AJ$5:$AK$79,2,0),"")

Use the "$" symbol to anchor your range



"vcprabhu" wrote:

Hi,
I have insereted a If function in a cell, eg
=IF(H5<"",VLOOKUP(H5,AJ5:AK79,2,0),""). Now I want the IF function applied
to all the cells in that cloumn with the same vlookup function. The vlookup
function keeps changing with the cell number, for eg it becomes
=IF(H6<"",VLOOKUP(H6, AJ6:AK80,2,0),""). I need the VLOOKUP function to
calculate AJ5:AK79 for all the cells.

Thanks.