View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Macro - How to increment cell reference by one row

Anytime you have Select'ed a specific cell with something like:
Range("E4").Select
you can move down to the next row with:

Selection.Offset(1,0).Select
--
Gary's Student
gsnu200706


"lau_ash" wrote:

I have a main sheet, and that references many other sheets with a specific
templet. Each templet sheet has a couple "special cells" that reference the
main page. Each row on the main page represents a sheet, and each column
represents these "special cells". What I need to do is have a macro that will
copy the last sheet, and make the "special cells"'s references/forumla
increment to next row on the main page.

I have the code that will copy the page, I just need to code to increment
the reference cells.

Sub Newsheet()

ActiveSheet.Select
ActiveSheet.Copy After:=ActiveSheet

'Select Special Cell1
'For example, Range("E4").Select
'Make it reference next row
'For example, change reference from ='Main Sheet'!R[248]C[1] to ='Main
Sheet'!R[249]C[2]
'Select Special Cell2
'For example Range("F20").Select
'Make it reference next row
'For example, change reference from ='Main Sheet'!R[248]C[2] to ='Main
Sheet'!R[249]C[2]

End Sub

I've tired to make my question as clear as possible....hopefully this makes
sense.