LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default format of copied data unclear

Hi all,
I'm copying three values from one worksheet to another using VBA. The
source of all three are formulae but I am only pasting the values and
formats at destination using PasteSpecial. All three source values
have the Cell Format "Custom" set to "hh:mm" and the visible values
are "00:31", "03:19" and "21:05" respectively.

On the destination however although the visible values remain the
same, the underlying values are now "01/01/1900 00:31:13",
"01/01/1900 03:19:39" and "21:05:49" respectively which interferes
with some of my formulae on the destination sheet. As you can see the
third value seems to be different from the rest and this is how I
would like the first and second values. I've checked everything but
have no idea what is causing this difference. Can anyone let me know
what I should be looking for?

Thank you kindly

Khurram


P.S Below is my code just in case

'Open Batch file
Workbooks.Open Filename:="C:\" & selectedMonth & " Batch Metrics.xls"

'Get Average Time APS Main Batch complete
Sheets("Batch Metrics").Cells.Find("Average").Select
ActiveCell.Offset(6, 5).Copy
Windows(2).Activate
Sheets("SD Summary").Select
Cells(1, 1).Select
ActiveSheet.PasteSpecial xlPasteValuesAndNumberFormats

'Get Average Time APS 2nd Batch start
Windows(2).Activate
Sheets("Batch Metrics").Cells.Find("Average").Select
ActiveCell.Offset(6, 2).Copy
Windows(2).Activate
Sheets("SD Summary").Select
Cells(2, 1).Select
Selection.PasteSpecial xlPasteValuesAndNumberFormats

'Get Average Time APS 2nd Batch complete
Windows(2).Activate
Sheets("Batch Metrics").Cells.Find("Average").Select
ActiveCell.Offset(6, 6).Copy
Windows(2).Activate
Sheets("SD Summary").Select
Cells(3, 1).Select
Selection.PasteSpecial xlPasteValuesAndNumberFormats

'Close Batch data file
Workbooks("Feb Batch Metrics.xls").Close SaveChanges:=False

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
data turned in date format when copied C02C04 Excel Discussion (Misc queries) 2 April 30th 09 04:42 PM
How do I unclear the value axis? taneate Charts and Charting in Excel 1 September 26th 06 08:38 AM
Unclear about hot to automate searchs Keith Excel Worksheet Functions 2 January 11th 06 03:35 PM
Unclear Error Message Yossi[_2_] Excel Programming 2 April 29th 05 04:52 PM
Why my cell format is not copied when I copied workbook? courtesio99[_28_] Excel Programming 0 January 9th 04 07:03 AM


All times are GMT +1. The time now is 10:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"