Excel Copying and pasting Time error

ZThaButcher

New Member
Joined
Nov 1, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Okay, So I have a document I have been building for a schedule.
I have a control sheet that has all the control data, then Base Data which has the same data plus different times for different time zones.
Then I have other sheets that have the same data but are related to their time zone.
It takes the PST Time and then converts it via the following code =CellforPSTTime+(1/24)
I have a Visual Basic Code that copies this and pastes it as a value.
Well for some reason with Times ranging from 00:00 - 2:00 AM it adds a date as seen in the screenshot below.
How can I get it to paste without the date? It is driving me crazy.
If it wouldn't mess up the chart to the right that would be fine but when it has a date it just spans it across the entire schedule as seen in the screenshot.
1676673637130.png



1676673506977.png
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
It depends on how you are using the times generated by your original formula in its orignal location (source sheet)
The copy is not creating the date but the formula is.
Depending on the answer you could change your formula to be
Excel Formula:
=MOD(CellforPSTTime+(1/24), 1)

If you want the code modified, it will need to need to peform a similar calculation and you will need to clarify your to and from range.
Copying BA3:BE150 to AG3 which will expand to the same no of rows and columns as in the copy from range, does not seem to make any sense in terms of the image you provided not to mention highlighting cells in the column AK.
 
Last edited:
Upvote 1
Solution

Forum statistics

Threads
1,223,884
Messages
6,175,173
Members
452,615
Latest member
bogeys2birdies

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