Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formulas with Counters


How do I place a formula in a cell while using a counter? Here's an
example of a formula that I want to use:

LEFT(OFFSET($A$27,(ROW($C1)-1)*14,0),LEN(OFFSET($A$27,(ROW($C1)-1)*14,0))-8

In addition, I want to place the same formula in the same column (as an
example Column C). Therefore, Cell $C1 will change to $C2 and so on.
I want to place the original formula in Cell C1 and then C2... I need
to use a counter to tell the program when to stop.

How do I do this? Thanks.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Formulas with Counters

counter = 15
Range("C1").Resize(counter,1).Formula = _
"=LEFT(OFFSET($A$27,(ROW($C1)-1)*14,0)," & _
"LEN(OFFSET($A$27,(ROW($C1)-1)*14,0))-8)"

--
Regards,
Tom Ogilvy


Novice wrote in message
...

How do I place a formula in a cell while using a counter? Here's an
example of a formula that I want to use:


LEFT(OFFSET($A$27,(ROW($C1)-1)*14,0),LEN(OFFSET($A$27,(ROW($C1)-1)*14,0))-8

In addition, I want to place the same formula in the same column (as an
example Column C). Therefore, Cell $C1 will change to $C2 and so on.
I want to place the original formula in Cell C1 and then C2... I need
to use a counter to tell the program when to stop.

How do I do this? Thanks.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Formulas with Counters

Aaaargh! I don't know how often I've created formulas like this, using
something like

Part1 = "= LEFT(OFFSET($A$27,(ROW($C"
Part2 = ")-1)*14,0)," & LEN(OFFSET($A$27,(ROW($C"
Part3 = ")-1)*14,0))-8)"
myFormula = Part1 & counter & Part2 & counter & Part3

and using a loop. <whimper

That's another technique saved for later :)
--
Darren
"Tom Ogilvy" wrote in message
...
counter = 15
Range("C1").Resize(counter,1).Formula = _
"=LEFT(OFFSET($A$27,(ROW($C1)-1)*14,0)," & _
"LEN(OFFSET($A$27,(ROW($C1)-1)*14,0))-8)"

--
Regards,
Tom Ogilvy


Novice wrote in message
...

How do I place a formula in a cell while using a counter? Here's an
example of a formula that I want to use:



LEFT(OFFSET($A$27,(ROW($C1)-1)*14,0),LEN(OFFSET($A$27,(ROW($C1)-1)*14,0))-8

In addition, I want to place the same formula in the same column (as an
example Column C). Therefore, Cell $C1 will change to $C2 and so on.
I want to place the original formula in Cell C1 and then C2... I need
to use a counter to tell the program when to stop.

How do I do this? Thanks.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Formulas with Counters

It is usually best to capitalize on Excel's built in capabilities to the
maximum extent possible.

--
Regards,
Tom Ogilvy

Darren Hill wrote in message
...
Aaaargh! I don't know how often I've created formulas like this, using
something like

Part1 = "= LEFT(OFFSET($A$27,(ROW($C"
Part2 = ")-1)*14,0)," & LEN(OFFSET($A$27,(ROW($C"
Part3 = ")-1)*14,0))-8)"
myFormula = Part1 & counter & Part2 & counter & Part3

and using a loop. <whimper

That's another technique saved for later :)
--
Darren
"Tom Ogilvy" wrote in message
...
counter = 15
Range("C1").Resize(counter,1).Formula = _
"=LEFT(OFFSET($A$27,(ROW($C1)-1)*14,0)," & _
"LEN(OFFSET($A$27,(ROW($C1)-1)*14,0))-8)"

--
Regards,
Tom Ogilvy


Novice wrote in message
...

How do I place a formula in a cell while using a counter? Here's an
example of a formula that I want to use:




LEFT(OFFSET($A$27,(ROW($C1)-1)*14,0),LEN(OFFSET($A$27,(ROW($C1)-1)*14,0))-8

In addition, I want to place the same formula in the same column (as

an
example Column C). Therefore, Cell $C1 will change to $C2 and so on.
I want to place the original formula in Cell C1 and then C2... I need
to use a counter to tell the program when to stop.

How do I do this? Thanks.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Formulas with Counters

Yes, you just have to know what they are first - that's one of the reasons
I'm here :)

--
Darren
"Tom Ogilvy" wrote in message
...
It is usually best to capitalize on Excel's built in capabilities to the
maximum extent possible.

--
Regards,
Tom Ogilvy

Darren Hill wrote in message
...
Aaaargh! I don't know how often I've created formulas like this, using
something like

Part1 = "= LEFT(OFFSET($A$27,(ROW($C"
Part2 = ")-1)*14,0)," & LEN(OFFSET($A$27,(ROW($C"
Part3 = ")-1)*14,0))-8)"
myFormula = Part1 & counter & Part2 & counter & Part3

and using a loop. <whimper

That's another technique saved for later :)
--
Darren
"Tom Ogilvy" wrote in message
...
counter = 15
Range("C1").Resize(counter,1).Formula = _
"=LEFT(OFFSET($A$27,(ROW($C1)-1)*14,0)," & _
"LEN(OFFSET($A$27,(ROW($C1)-1)*14,0))-8)"

--
Regards,
Tom Ogilvy


Novice wrote in message
...

How do I place a formula in a cell while using a counter? Here's an
example of a formula that I want to use:





LEFT(OFFSET($A$27,(ROW($C1)-1)*14,0),LEN(OFFSET($A$27,(ROW($C1)-1)*14,0))-8

In addition, I want to place the same formula in the same column (as

an
example Column C). Therefore, Cell $C1 will change to $C2 and so

on.
I want to place the original formula in Cell C1 and then C2... I

need
to use a counter to tell the program when to stop.

How do I do this? Thanks.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/









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
Need help with Counters Vic Excel Discussion (Misc queries) 5 April 5th 10 06:38 PM
INVOICE COUNTERS omega25 Excel Worksheet Functions 0 November 16th 05 10:20 PM
INVOICE COUNTERS omega25 Excel Worksheet Functions 1 November 16th 05 10:19 PM
Counters Paul Excel Worksheet Functions 2 February 11th 05 01:52 PM
counters tag Excel Programming 0 September 14th 03 12:48 AM


All times are GMT +1. The time now is 09:01 PM.

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"