Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default VBA - entering a formula in excel

I want to be able to enter a formula into the spreadsheet which counts the
number of entries in a range.
However the range can be a variable number of rows.
It will however always refer to the row which is end(xlup) from the cell
containing the formula (ie my start point - the activecell) and it will
always anchoring from this pount to end(xlup) twice then down one cell. So
basically i am wanting to enter a number of formulas in various parts of the
spreadsheet which are never in the same location
-counta(End(xlup):(End(xlup)end(xlup)(down)) are my key strokes - but can not
see how to replicate this in VBA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default VBA - entering a formula in excel

Dim rng As Range

Set rng = Range(ActiveCell, ActiveCell.End(xlUp).End(xlUp).Offset(1, 0))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Marie" wrote in message
...
I want to be able to enter a formula into the spreadsheet which counts the
number of entries in a range.
However the range can be a variable number of rows.
It will however always refer to the row which is end(xlup) from the cell
containing the formula (ie my start point - the activecell) and it will
always anchoring from this pount to end(xlup) twice then down one cell. So
basically i am wanting to enter a number of formulas in various parts of
the
spreadsheet which are never in the same location
-counta(End(xlup):(End(xlup)end(xlup)(down)) are my key strokes - but can
not
see how to replicate this in VBA



Reply
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
Edit formula while entering Excel 2000 Kevryl Excel Discussion (Misc queries) 5 March 11th 10 02:54 AM
Entering a formula using excel 2003 dpalmer Excel Worksheet Functions 0 May 14th 09 10:03 PM
I am entering date in Excel when I hit enter a formula appears? Sun Devil New Users to Excel 4 April 24th 06 08:56 PM
entering formula using variable in Excel Macro doc-s Excel Programming 1 August 18th 04 08:27 PM
Entering a Excel formula in a Cell through VBA? NooK[_20_] Excel Programming 2 June 30th 04 08:50 AM


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

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

About Us

"It's about Microsoft Excel"