ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   moveing values with macros (https://www.excelbanter.com/excel-programming/303251-re-moveing-values-macros.html)

carlos1973

moveing values with macros
 
thanks guys sheet works great now

"Vasant Nanavati" wrote:

If I understand the problem correctly, something like the following
(untested) should work:

Sub AddRefCell()
If Range("A1") = "" Then
Range("A1") = Range("C1")
Else
Range("A" & Rows.Count).End(xlUp).Offset(1) = Range("C1")
End If
End Sub

I assume the value of C1 will be changed manually between runs.

--

Vasant


"carlos1973" wrote in message
...
hi,

is there a way of using a macro to move a value from one cell to another.

then the next time it is run adding the value in the ref cell to the next
cell down the reference cells value is a variable . for example

ref cell = c1

no run 1st run 2nd run 3rd run 4th run
c1 12 12 13 7 27
a1 0 12 12 12 12
a2 0 0 13 13 13
a3 0 0 0 7 7
a4 0 0 0 0 27

im sure there must be a solution that is really simple but i dont have

much experience with excel and i would appreciate your help






All times are GMT +1. The time now is 03:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com