LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jan Jan is offline
external usenet poster
 
Posts: 159
Default VBA for calucation instead row/cell reference

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
removing the "-" sign in a calucation gma Excel Worksheet Functions 8 February 3rd 09 05:23 AM
Formulas that reference cells that reference another cell Andrea Excel Discussion (Misc queries) 7 October 19th 06 08:14 AM
absolute cell reference A spreadsheet cell reference that does no help Excel Discussion (Misc queries) 1 January 18th 06 06:56 PM
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. [email protected] Excel Worksheet Functions 2 December 11th 04 12:05 AM
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable [email protected] Excel Worksheet Functions 2 December 11th 04 12:00 AM


All times are GMT +1. The time now is 09:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"