Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Can someone help with a basic question?
This is the function which works in Excel: =COUNTA(A337:A359) I don't want to put it on the worksheet, but rather calculate it in my VBA procedure. I have two variables that identify the row numbers as follows: FFR = row 337, and FTR = row 359. I want the result of the above formula assigned to variable DayNum. Any help would be greatly appreciated. Thanks. Robert |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try:
Sub Test() Dim FFR As Long Dim FRT As Long Dim DayNum As Double FFR = 337 FTR = 359 DayNum = Application.CountA(Range("A" & _ FFR & ":" & "A" & FTR)) End Sub "xjetjockey" wrote: Can someone help with a basic question? This is the function which works in Excel: =COUNTA(A337:A359) I don't want to put it on the worksheet, but rather calculate it in my VBA procedure. I have two variables that identify the row numbers as follows: FFR = row 337, and FTR = row 359. I want the result of the above formula assigned to variable DayNum. Any help would be greatly appreciated. Thanks. Robert |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Perfect. Thank you so much.
JMB wrote: Try: Sub Test() Dim FFR As Long Dim FRT As Long Dim DayNum As Double FFR = 337 FTR = 359 DayNum = Application.CountA(Range("A" & _ FFR & ":" & "A" & FTR)) End Sub "xjetjockey" wrote: Can someone help with a basic question? This is the function which works in Excel: =COUNTA(A337:A359) I don't want to put it on the worksheet, but rather calculate it in my VBA procedure. I have two variables that identify the row numbers as follows: FFR = row 337, and FTR = row 359. I want the result of the above formula assigned to variable DayNum. Any help would be greatly appreciated. Thanks. Robert |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Glad to help.
"xjetjockey" wrote: Perfect. Thank you so much. JMB wrote: Try: Sub Test() Dim FFR As Long Dim FRT As Long Dim DayNum As Double FFR = 337 FTR = 359 DayNum = Application.CountA(Range("A" & _ FFR & ":" & "A" & FTR)) End Sub "xjetjockey" wrote: Can someone help with a basic question? This is the function which works in Excel: =COUNTA(A337:A359) I don't want to put it on the worksheet, but rather calculate it in my VBA procedure. I have two variables that identify the row numbers as follows: FFR = row 337, and FTR = row 359. I want the result of the above formula assigned to variable DayNum. Any help would be greatly appreciated. Thanks. Robert |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
numerical integration | Excel Discussion (Misc queries) | |||
Aling multiple sets of data by header column | Excel Discussion (Misc queries) | |||
Offset function referencing worksheet | Excel Discussion (Misc queries) | |||
Worksheet VBA function - not recognized | Excel Worksheet Functions | |||
changing font style in a complex worksheet function | Excel Worksheet Functions |