JenniferMurphy
Well-known Member
- Joined
- Jul 23, 2011
- Messages
- 2,691
- Office Version
- 365
- Platform
- Windows
I have a little macro that I have assigned to a command button. It's basically working except for one detail. There are several named cells in the worksheet. Each one is a column header. I need to perform arithmetic on the cell immediately below each header. If the header is in B4, I need to do arithmetic on B5.
I need something like this:
Public Sub Tally()
Dim row as integer, col as integer
row=activesheet.cell("HdrA").row+1
col =activesheet.cell("HdrA").column
activesheet.cell(row, col) = activesheet.cell(row, col) + 1
End Sub
The above doesn't work. Can anyone help me with the correct syntax?
I need something like this:
Public Sub Tally()
Dim row as integer, col as integer
row=activesheet.cell("HdrA").row+1
col =activesheet.cell("HdrA").column
activesheet.cell(row, col) = activesheet.cell(row, col) + 1
End Sub
The above doesn't work. Can anyone help me with the correct syntax?