Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Adding Cell Values to Ranges


Hi All,

Is it possible to program a macro that will add a user
entered value in cell ("c1") to a range of cells c2-c15.

Then if the user chooses, add another value entered into
("C2"),to a reduced range of cells c3-c15, so each time I
am eliminating the value in the preceeding cell reference.

The spreadsheet, comprised mainly of formula is linked to
a standard chart but it can be adjusted by entering manual
values in the c column, so for the chart to work I have to
keep adding the manual numbers entered to each cell in the
range except the cell in which the manual value was
entered.

Does that make any sense ?, Any help even to part of the
query would be great.

Thanking you in advance

Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Adding Cell Values to Ranges


Thanks Bernie, I'll give that a go, it has put me in the
right direction !


-----Original Message-----
Mike,

I think if your use the formula

=C1

in cell C2 and copy it down to C3:C15, you'll get the

result you want. You don't say what the value in C1
should start as, so you
should consider that aspect of the problem.

If you want a macro to enter the user's value for him,

you could use this line to enter user entered numbers into
successive cells
in C1:C15.

Range("C1:C15").SpecialCells(xlCellTypeFormulas , 23)

(1).Value = _
Application.InputBox("Enter a value", , , , , , , 1)

Note that this simply overwrites the formula in the first

cell with a formula.

HTH,
Bernie
Excel MVP


"Mike R" wrote in message

...

Hi All,

Is it possible to program a macro that will add a user
entered value in cell ("c1") to a range of cells c2-c15.

Then if the user chooses, add another value entered into
("C2"),to a reduced range of cells c3-c15, so each time

I
am eliminating the value in the preceeding cell

reference.

The spreadsheet, comprised mainly of formula is linked

to
a standard chart but it can be adjusted by entering

manual
values in the c column, so for the chart to work I have

to
keep adding the manual numbers entered to each cell in

the
range except the cell in which the manual value was
entered.

Does that make any sense ?, Any help even to part of the
query would be great.

Thanking you in advance

Mike



.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Adding Cell Values to Ranges

Mike,

Check out the worksheet change event.

you should be able to do something with it. You will need to check the cell
in which data has been entered, and then use the row value of that cell to
determine which range of cells to update.

Steve
"Mike R" wrote in message
...

Hi All,

Is it possible to program a macro that will add a user
entered value in cell ("c1") to a range of cells c2-c15.

Then if the user chooses, add another value entered into
("C2"),to a reduced range of cells c3-c15, so each time I
am eliminating the value in the preceeding cell reference.

The spreadsheet, comprised mainly of formula is linked to
a standard chart but it can be adjusted by entering manual
values in the c column, so for the chart to work I have to
keep adding the manual numbers entered to each cell in the
range except the cell in which the manual value was
entered.

Does that make any sense ?, Any help even to part of the
query would be great.

Thanking you in advance

Mike



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
Adding up cell values only with identical info in other cells rarch1 Excel Worksheet Functions 9 February 11th 08 04:54 PM
Adding % to existing cell values John Excel Discussion (Misc queries) 6 December 12th 07 06:31 PM
Referencing Named Ranges using values in a cell eggman Excel Discussion (Misc queries) 2 September 23rd 06 06:30 PM
adding ranges [email protected] Excel Discussion (Misc queries) 2 November 21st 05 04:22 PM
How to slot cell values into pre-defined ranges KDD Excel Discussion (Misc queries) 7 August 29th 05 03:34 PM


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