![]() |
Doing Sums on existing numbers
Hi all,
I want to try and do something on excel but cannot do it. I have numbers on Cell C1-C10. If I were to key in a number at D1, C1-C10 will reflect number of whatever number on the cell itself plus the number on D1. That means Number on C1 will reflect the number equavilent to the sum of the existing number on C1 and number on D1. And Number on C2 will reflect the the number equavilent to the sum of the existing number on C2 and number on D1. And so on until C10. Really appreciate if you all can help me. Thanks a zillion. |
Hi!
Try this: Suppose you want to add 10 to each cell in the range C1:C10. Enter 10 in D1. Select cell D1 Copy cell D1 Select the range C1:C10 Paste SpecialAddOK Biff "htan1" wrote in message ... Hi all, I want to try and do something on excel but cannot do it. I have numbers on Cell C1-C10. If I were to key in a number at D1, C1-C10 will reflect number of whatever number on the cell itself plus the number on D1. That means Number on C1 will reflect the number equavilent to the sum of the existing number on C1 and number on D1. And Number on C2 will reflect the the number equavilent to the sum of the existing number on C2 and number on D1. And so on until C10. Really appreciate if you all can help me. Thanks a zillion. |
That does work but I will need it in a more automated way.....is there
anyway I can do it via formula so that I do not have to do a paste.....because the data involve is in thousands and around different cell locations thus I cannot go around copy and paste all the time. Thanks a zillion "Biff" wrote in message ... Hi! Try this: Suppose you want to add 10 to each cell in the range C1:C10. Enter 10 in D1. Select cell D1 Copy cell D1 Select the range C1:C10 Paste SpecialAddOK Biff "htan1" wrote in message ... Hi all, I want to try and do something on excel but cannot do it. I have numbers on Cell C1-C10. If I were to key in a number at D1, C1-C10 will reflect number of whatever number on the cell itself plus the number on D1. That means Number on C1 will reflect the number equavilent to the sum of the existing number on C1 and number on D1. And Number on C2 will reflect the the number equavilent to the sum of the existing number on C2 and number on D1. And so on until C10. Really appreciate if you all can help me. Thanks a zillion. |
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range On Error GoTo ws_exit: Application.EnableEvents = False If Target.Address(False, False) = "D1" Then With Target If IsNumeric(.Value) Then For Each cell In Range("C1").Resize(Cells(Rows.Count, "C").End(xlUp).Row) cell.Value = cell.Value + .Value Next cell End If End With End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips "htan1" wrote in message ... That does work but I will need it in a more automated way.....is there anyway I can do it via formula so that I do not have to do a paste.....because the data involve is in thousands and around different cell locations thus I cannot go around copy and paste all the time. Thanks a zillion "Biff" wrote in message ... Hi! Try this: Suppose you want to add 10 to each cell in the range C1:C10. Enter 10 in D1. Select cell D1 Copy cell D1 Select the range C1:C10 Paste SpecialAddOK Biff "htan1" wrote in message ... Hi all, I want to try and do something on excel but cannot do it. I have numbers on Cell C1-C10. If I were to key in a number at D1, C1-C10 will reflect number of whatever number on the cell itself plus the number on D1. That means Number on C1 will reflect the number equavilent to the sum of the existing number on C1 and number on D1. And Number on C2 will reflect the the number equavilent to the sum of the existing number on C2 and number on D1. And so on until C10. Really appreciate if you all can help me. Thanks a zillion. |
All times are GMT +1. The time now is 09:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com