Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All,
I would like to calculate a range via VBA instead of referencing the range/cell from the worksheet. How would I write the code in VBA to do the following formula calculations that are in a cell off to the side from the data of the worksheet? =countif(R3:r5000,1) =subtotal(3, C3:c5000) In VBA, I have the range/cell reference, but would like to just use the formula in the code instead of on the worksheet. See below code. Format(Date, "mmm d, yyyy") & Chr(10) & "Number of Projects in List =" & " " & Range("w2") _ & Chr(10) & "Assignments: Mike=" & Range("x2") TIA - Jan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Application.Countif(Range("R3:R5000"),1)
-- HTH Bob Phillips (remove nothere from the email address if mailing direct) "Jan" wrote in message ... Hello All, I would like to calculate a range via VBA instead of referencing the range/cell from the worksheet. How would I write the code in VBA to do the following formula calculations that are in a cell off to the side from the data of the worksheet? =countif(R3:r5000,1) =subtotal(3, C3:c5000) In VBA, I have the range/cell reference, but would like to just use the formula in the code instead of on the worksheet. See below code. Format(Date, "mmm d, yyyy") & Chr(10) & "Number of Projects in List =" & " " & Range("w2") _ & Chr(10) & "Assignments: Mike=" & Range("x2") TIA - Jan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
removing the "-" sign in a calucation | Excel Worksheet Functions | |||
Formulas that reference cells that reference another cell | Excel Discussion (Misc queries) | |||
absolute cell reference A spreadsheet cell reference that does no | Excel Discussion (Misc queries) | |||
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. | Excel Worksheet Functions | |||
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable | Excel Worksheet Functions |