Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Toggle Control & Formula

Hi all,

I was wondering is it be possible to add the same value to
a range of cells on a column by using the toggle control.
What I have in column A is a range of formula, which forms
an s-curve.

What I want to be able to do is change the shape / slope
of this curve i.e. slow start, fast start, by adding or
subtracting a value, which would be operated by a toggle
control.

At the moment I have to edit each cell individually and
manually add or subtract my value to every cell which can
be a as much as fifty cells, very time consuming!

Any help very much appreciated.

Michael

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Toggle Control & Formula

Hi Micheal

Create a namedRange for you values in the curve. Add a
spin control to the worksheet. Create another namedRange
which is the value that you want to add / subtract from
all your curve values.

Add the following code to your spin control

Private Sub SpinButton1_SpinDown()
Dim rng As Range

For Each rng In Range("myRange")
rng.Value = rng.Value - Range("myValue")
Next
'cleanUp
Set rng = Nothing
End Sub

Private Sub SpinButton1_SpinUp()
Dim rng As Range

For Each rng In Range("myRange")
rng.Value = rng.Value + Range("myValue")
Next
'cleanUp
Set rng = Nothing
End Sub

Replace the myRange with the name of your range of curve
values, and replace myValue with the name of your value
to add/ subtract.

Richard Daniels


-----Original Message-----
Hi all,

I was wondering is it be possible to add the same value

to
a range of cells on a column by using the toggle

control.
What I have in column A is a range of formula, which

forms
an s-curve.

What I want to be able to do is change the shape / slope
of this curve i.e. slow start, fast start, by adding or
subtracting a value, which would be operated by a toggle
control.

At the moment I have to edit each cell individually and
manually add or subtract my value to every cell which

can
be a as much as fifty cells, very time consuming!

Any help very much appreciated.

Michael

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Toggle Control & Formula

Thanks for your help Richard, I'll give that a go.


-----Original Message-----
Hi Micheal

Create a namedRange for you values in the curve. Add a
spin control to the worksheet. Create another namedRange
which is the value that you want to add / subtract from
all your curve values.

Add the following code to your spin control

Private Sub SpinButton1_SpinDown()
Dim rng As Range

For Each rng In Range("myRange")
rng.Value = rng.Value - Range("myValue")
Next
'cleanUp
Set rng = Nothing
End Sub

Private Sub SpinButton1_SpinUp()
Dim rng As Range

For Each rng In Range("myRange")
rng.Value = rng.Value + Range("myValue")
Next
'cleanUp
Set rng = Nothing
End Sub

Replace the myRange with the name of your range of curve
values, and replace myValue with the name of your value
to add/ subtract.

Richard Daniels


-----Original Message-----
Hi all,

I was wondering is it be possible to add the same value

to
a range of cells on a column by using the toggle

control.
What I have in column A is a range of formula, which

forms
an s-curve.

What I want to be able to do is change the shape / slope
of this curve i.e. slow start, fast start, by adding or
subtracting a value, which would be operated by a toggle
control.

At the moment I have to edit each cell individually and
manually add or subtract my value to every cell which

can
be a as much as fifty cells, very time consuming!

Any help very much appreciated.

Michael

.

.

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
Process control chart for quality control in exel? Kara Charts and Charting in Excel 2 May 11th 10 05:45 PM
2007 Form Control/ActiveX Control font difference Nikko963 Excel Discussion (Misc queries) 0 April 15th 09 04:21 PM
Excel spin box - no Control tab in Format Control dialong box tocoau Excel Worksheet Functions 7 August 10th 08 03:15 PM
Difference between a Forms Control verus Active-X Control funGT350 Excel Discussion (Misc queries) 6 May 6th 08 11:20 PM
Can't toggle (or display) formula bar DES1944 Excel Discussion (Misc queries) 5 June 29th 06 12:14 AM


All times are GMT +1. The time now is 06:40 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"