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: 16
Default Entry of Incomplete Dates

Hi, Frank

The code is nothing special. The line of data being read:

Category;Nov 1;Nov 30;Change

line = myfile.readline
For j = 1 To 10000
k = InStr(line, ";")
If k 0 Then
dat = Left(line, k - 1)
Cells(i, j).Value = dat
line = Right(line, Len(line) - k)
Else
Cells(i, j).Value = line
Exit For
End If
Next j

What happens: the data displays as "Nov 1", etc., but is actually stored as
being within the current year.
I was hoping I could specify a default year somehow which would apply in
this case. Otherwise, I suppose my only solution is to check every cell
which might contain a date for the year.

"Frank Kabel" wrote in message
...
Hi
you may post the relevant part of your code which you're currently
using for inserting the date fields

--
Regards
Frank Kabel
Frankfurt, Germany


George B wrote:
I am attempting to extract data from a series of dated reports, using
a macro to insert data into various cells. Some of the data
represent dates, in the form 1-Nov or December 1. These appear to be
correct when viewing the worksheet, but I notice that the actual
entry in the cell is for this year, regardless of the year of the
report. Is there any way to specify a default year when the date is
incomplete?




 
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
Automatically Insert Dates For Week Off One Day Entry CVinje Excel Discussion (Misc queries) 7 March 29th 09 07:37 AM
incomplete name on y axis jdhcrbc Excel Discussion (Misc queries) 0 August 10th 08 11:32 PM
entry and exit dates refstone Excel Discussion (Misc queries) 2 February 5th 07 10:31 PM
how to make excel record cell entry dates hoyt New Users to Excel 5 June 12th 06 11:45 AM
Auto entry of "=" before dates lg Excel Worksheet Functions 2 January 28th 05 01:13 AM


All times are GMT +1. The time now is 08:09 PM.

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"