Copy data from one cell to another

fiesta

Board Regular
Joined
Nov 4, 2005
Messages
84
Hi
I have cell say A10 which is the result of a formula and the result changes
every time the worksheet is updated.
Is there any coding that will insert the result of A10 into say C10 and if C10
already contains data insert in C11 and so on, this only needs to go as far
as C16.
If there is coding could you please show me as I'm just getting into VBA.

Any help would be appreciated.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Welcome to MrExcel - what should happen if all cells in C10:C16 have something in them?

Is this an entry each day for a week? In other words, should an entry on the 3rd day of the week show up in the 3rd column C cell [C12]?
 
Upvote 0
just_jon said:
Welcome to MrExcel - what should happen if all cells in C10:C16 have something in them?

Is this an entry each day for a week? In other words, should an entry on the 3rd day of the week show up in the 3rd column C cell [C12]?
Hi Just_Jon
I'm sorry I made a mistake it should be C10:C25.
If C10:C25 are full I would like to go back to C10 again.
Some days may only use C10:C15 but won't go any further
than C25 on any given day.
 
Upvote 0
<font face=Courier New><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Worksheet_Calculate()
Range("C" & 10 + Application.WorksheetFunction.Count([C10:C25])) = [A1].Value
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>
 
Upvote 0
It is meant to fire on each calculation.

As the cell isd a formula, it should fire whenever that cell's value changes.

Is it not doing that? Is calculation set to Automatic?
 
Upvote 0
No its not firing after each update and Yes the calculations are set to AUTO.
Like I said if I go into the Module and run the Debug it works but it highlights End Sub.
Ive had another look since I wrote above and the code seems to stop
before the line End Sub. If I put the cursor after the END SUB and press
the RUN button in the module it works every time.
Hope this will help.
 
Upvote 0

Forum statistics

Threads
1,206,757
Messages
6,074,760
Members
446,084
Latest member
WalmitAal

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top