View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] YehWei@gmail.com is offline
external usenet poster
 
Posts: 15
Default How to loop by chaning the cell reference?

Hi, I'm trying to do a loop to add names for each column by using the
following formula. As such, the "C5" in "R1C5" will probably need to
increase from 5 to a previously determined number. Would like seek
expertise how I can loop through this formula effectively. Thank you
very much!


ActiveWorkbook.Names.Add Name:="C5", RefersToR1C1:= _
"=OFFSET('Wfr Lvl'!R1C5,1,0,COUNTA('Wfr Lvl'!C5)-1,1)"