Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding up cell values only with identical info in other cells | Excel Worksheet Functions | |||
Adding % to existing cell values | Excel Discussion (Misc queries) | |||
Referencing Named Ranges using values in a cell | Excel Discussion (Misc queries) | |||
adding ranges | Excel Discussion (Misc queries) | |||
How to slot cell values into pre-defined ranges | Excel Discussion (Misc queries) |