Consulting

Results 1 to 2 of 2

Thread: Copy and pasting time calculations

  1. #1
    VBAX Regular
    Joined
    Aug 2009
    Posts
    24
    Location

    Copy and pasting time calculations

    There is probably a very, VERY simple answer to this question, but I'm sorry - I can't solve it.

    I have a spreadsheet with 2 countdown clocks. Cell A1 shows the countdown in Days, Minutes, Hours, Seconds. Cell A2 shows the countdown total in seconds only.

    I have a button on the spreadsheet that updates these values. Simple so far. But the other function is to copy the CURRENT values for both cells, to cells (say C1, C3) BEFORE updating the values in Cells A1 and A2. A copy paste macro will copy one of the current values, but not both of the current values. If I copy paste indvidually, it results in one of the cells updating as the other is copy, pasted. Any ideas anybody?

    The idea is to compare what the previous values were, before they are updated.

    Thanks for the help.

  2. #2
    VBAX Expert
    Joined
    May 2016
    Posts
    604
    Location
    You can do it by loading the values in to an array:

    [vba]Arra= range(cells(1,1),cells(1,2))
    Range(cells(1,3),cells(1,3))=Arra(1,1)
    Range(cells(3,3),cells(3,3))=Arra(1,2)[/vba]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •