Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
syntax problem
hello to all
I have a code line... ActiveCell.Formula = "=COUNT(P5:P15)" But the rowOffset won't always be 10. I've defined a rowOffset, called RowOff, but I can't get the syntax to work with the COUNT function? Something like ... ActiveCell.Formula = "=COUNT(P5:P ***RowOff goes in here somehow*** )" thanks Dorre |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
syntax problem
try
ActiveCell.Formula = "=COUNT(P5:P" & RowOff & ")" -- Gary "dorre" wrote in message ... hello to all I have a code line... ActiveCell.Formula = "=COUNT(P5:P15)" But the rowOffset won't always be 10. I've defined a rowOffset, called RowOff, but I can't get the syntax to work with the COUNT function? Something like ... ActiveCell.Formula = "=COUNT(P5:P ***RowOff goes in here somehow*** )" thanks Dorre |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
syntax problem
Close, but this evaluates to: ActiveCell.Formula = "=COUNT(P5:P10)"
I need to understand the syntax in adding an offset (rowOff) of, say 10, to P5, resulting in an expression equivalent to: ActiveCell.Formula = "=COUNT(P5:P15)" Thanks. Dorre "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... try ActiveCell.Formula = "=COUNT(P5:P" & RowOff & ")" -- Gary "dorre" wrote in message ... hello to all I have a code line... ActiveCell.Formula = "=COUNT(P5:P15)" But the rowOffset won't always be 10. I've defined a rowOffset, called RowOff, but I can't get the syntax to work with the COUNT function? Something like ... ActiveCell.Formula = "=COUNT(P5:P ***RowOff goes in here mehow*** )" thanks Dorre |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
syntax problem
in this example, i just set RowOff to 10 for testing, is this what you want?
this will count p5:p20 Sub test() RowOff = 10 ActiveCell.Formula = "=COUNT(P5:P" & 10 + RowOff & ")" End Sub -- Gary "dorre" wrote in message ... Close, but this evaluates to: ActiveCell.Formula = "=COUNT(P5:P10)" I need to understand the syntax in adding an offset (rowOff) of, say 10, to P5, resulting in an expression equivalent to: ActiveCell.Formula = "=COUNT(P5:P15)" Thanks. Dorre "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... try ActiveCell.Formula = "=COUNT(P5:P" & RowOff & ")" -- Gary "dorre" wrote in message ... hello to all I have a code line... ActiveCell.Formula = "=COUNT(P5:P15)" But the rowOffset won't always be 10. I've defined a rowOffset, called RowOff, but I can't get the syntax to work with the COUNT function? Something like ... ActiveCell.Formula = "=COUNT(P5:P ***RowOff goes in here mehow*** )" thanks Dorre |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with Syntax? | Excel Worksheet Functions | |||
Syntax problem | Excel Programming | |||
Syntax problem | Excel Worksheet Functions | |||
Another Syntax Problem | Excel Programming |