Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Syntax question
Some help, please:
ActiveCell.Offset(0, 1).Formula = _ "=Sum(G4: ...........G.?....)" where G? can be defined as the cell: ActiveCell.Offset(-2, 1) As I get older, I forget even the simplest of things! Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.545 / Virus Database: 339 - Release Date: 27/11/2003 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Syntax question
ActiveCell.Offset(0, 1).Formula = _
"=Sum($G$4:" & ActiveCell.Offset(-2, 1).Address & ")" -- HTH, Dianne In , Stuart typed: Some help, please: ActiveCell.Offset(0, 1).Formula = _ "=Sum(G4: ...........G.?....)" where G? can be defined as the cell: ActiveCell.Offset(-2, 1) As I get older, I forget even the simplest of things! Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.545 / Virus Database: 339 - Release Date: 27/11/2003 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Syntax question
Some help, please:
ActiveCell.Offset(0, 1).Formula = _ "=Sum(G4:G" & ActiveCell.Offset(-2,1) & ")" if you want it hard coded. If you want your formula to dynamically refer to this cell "=Sum(Indirect(""G4:G"" & " & ActiveCell.Offset(-2,1).Address(0,0) & "))" ? "=Sum(Indirect(""G4:G"" & " & ActiveCell.Offset(-2,1).Address(0,0) & "))" =Sum(Indirect("G4:G" & E97)) so if E97 contained 100 then the sum would sum G4:G100 -- Regards, Tom Ogilvy "Stuart" wrote in message ... Some help, please: ActiveCell.Offset(0, 1).Formula = _ "=Sum(G4: ...........G.?....)" where G? can be defined as the cell: ActiveCell.Offset(-2, 1) As I get older, I forget even the simplest of things! Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.545 / Virus Database: 339 - Release Date: 27/11/2003 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Syntax question
Many thanks to you both.
Forgot the need for 'Address' Regards. "Dianne" wrote in message ... ActiveCell.Offset(0, 1).Formula = _ "=Sum($G$4:" & ActiveCell.Offset(-2, 1).Address & ")" -- HTH, Dianne In , Stuart typed: Some help, please: ActiveCell.Offset(0, 1).Formula = _ "=Sum(G4: ...........G.?....)" where G? can be defined as the cell: ActiveCell.Offset(-2, 1) As I get older, I forget even the simplest of things! Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.545 / Virus Database: 339 - Release Date: 27/11/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.545 / Virus Database: 339 - Release Date: 27/11/2003 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Syntax question | Excel Worksheet Functions | |||
VBA syntax question | Excel Discussion (Misc queries) | |||
syntax question | Excel Worksheet Functions | |||
More on VBE syntax line question | Excel Programming | |||
VBA Syntax Question? | Excel Programming |