Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 407
Default Macro command

I have inherited a file with a column of dates. However, each data
apparently has a blank space in front of it, so it is not recognized as a
real date. Hence I cannot perform algebraic manipulations on them as is.

I need to be able to go to each cell (thousands of them) in these columns
and take out this space on the left. Can someone tell me what the macro
should be to, say, start in cell C8 and edit it and take out the leftmost
character (which is a blank), and then move on to the next row down in that
column. Since some of the rows might be empty, it would be better if we
could just skip those, but it is not necessary.

In case it helps, I believe that all dates are in xx/yy/zz format (with one
spacebar in front).

Thanks!
Dean


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Macro command

Why not just do a find and replace on the blank. When the space is replaced
Excel should do an implicit conversion of the value to a date? It is a pile
easier than the code...
--
HTH...

Jim Thomlinson


"Dean" wrote:

I have inherited a file with a column of dates. However, each data
apparently has a blank space in front of it, so it is not recognized as a
real date. Hence I cannot perform algebraic manipulations on them as is.

I need to be able to go to each cell (thousands of them) in these columns
and take out this space on the left. Can someone tell me what the macro
should be to, say, start in cell C8 and edit it and take out the leftmost
character (which is a blank), and then move on to the next row down in that
column. Since some of the rows might be empty, it would be better if we
could just skip those, but it is not necessary.

In case it helps, I believe that all dates are in xx/yy/zz format (with one
spacebar in front).

Thanks!
Dean



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 407
Default Macro command

Very clever answer. I must be getting old as I recall having thought of
this myself before. Yesterday was a bad day.

Thanks much.


"Jim Thomlinson" wrote in message
...
Why not just do a find and replace on the blank. When the space is
replaced
Excel should do an implicit conversion of the value to a date? It is a
pile
easier than the code...
--
HTH...

Jim Thomlinson


"Dean" wrote:

I have inherited a file with a column of dates. However, each data
apparently has a blank space in front of it, so it is not recognized as a
real date. Hence I cannot perform algebraic manipulations on them as is.

I need to be able to go to each cell (thousands of them) in these columns
and take out this space on the left. Can someone tell me what the macro
should be to, say, start in cell C8 and edit it and take out the leftmost
character (which is a blank), and then move on to the next row down in
that
column. Since some of the rows might be empty, it would be better if we
could just skip those, but it is not necessary.

In case it helps, I believe that all dates are in xx/yy/zz format (with
one
spacebar in front).

Thanks!
Dean





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default Macro command

why not look at all the replies to your original post yesterday? no need to
post again

you could also do this:
select the entire column
click data and then text to columns
choose delimited
click next
put a check next to space under delimiters
click next and then finish

it will put the dates in the next column to the right. if you have data
there now, just insert a column to the right of the original "date" field



--


Gary


"Dean" wrote in message
...
I have inherited a file with a column of dates. However, each data
apparently has a blank space in front of it, so it is not recognized as a
real date. Hence I cannot perform algebraic manipulations on them as is.

I need to be able to go to each cell (thousands of them) in these columns
and take out this space on the left. Can someone tell me what the macro
should be to, say, start in cell C8 and edit it and take out the leftmost
character (which is a blank), and then move on to the next row down in
that column. Since some of the rows might be empty, it would be better if
we could just skip those, but it is not necessary.

In case it helps, I believe that all dates are in xx/yy/zz format (with
one spacebar in front).

Thanks!
Dean



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 407
Default Macro command

For some reason, when I checked in today, I did not see my post yesterday.
In fact, I still don't! I assume it is some quirk of Outlook Express. Can
you tell me the URL so I can view these answers directly, although the two
answers to my 2nd post are both excellent enough.

Sorry,
Dean

"Gary Keramidas" wrote in message
...
why not look at all the replies to your original post yesterday? no need
to post again

you could also do this:
select the entire column
click data and then text to columns
choose delimited
click next
put a check next to space under delimiters
click next and then finish

it will put the dates in the next column to the right. if you have data
there now, just insert a column to the right of the original "date" field



--


Gary


"Dean" wrote in message
...
I have inherited a file with a column of dates. However, each data
apparently has a blank space in front of it, so it is not recognized as a
real date. Hence I cannot perform algebraic manipulations on them as is.

I need to be able to go to each cell (thousands of them) in these columns
and take out this space on the left. Can someone tell me what the macro
should be to, say, start in cell C8 and edit it and take out the leftmost
character (which is a blank), and then move on to the next row down in
that column. Since some of the rows might be empty, it would be better
if we could just skip those, but it is not necessary.

In case it helps, I believe that all dates are in xx/yy/zz format (with
one spacebar in front).

Thanks!
Dean







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default Macro command

try resetting the newsgroup. it should show up.

--


Gary


"Dean" wrote in message
...
For some reason, when I checked in today, I did not see my post yesterday.
In fact, I still don't! I assume it is some quirk of Outlook Express.
Can you tell me the URL so I can view these answers directly, although the
two answers to my 2nd post are both excellent enough.

Sorry,
Dean

"Gary Keramidas" wrote in message
...
why not look at all the replies to your original post yesterday? no need
to post again

you could also do this:
select the entire column
click data and then text to columns
choose delimited
click next
put a check next to space under delimiters
click next and then finish

it will put the dates in the next column to the right. if you have data
there now, just insert a column to the right of the original "date" field



--


Gary


"Dean" wrote in message
...
I have inherited a file with a column of dates. However, each data
apparently has a blank space in front of it, so it is not recognized as a
real date. Hence I cannot perform algebraic manipulations on them as is.

I need to be able to go to each cell (thousands of them) in these
columns and take out this space on the left. Can someone tell me what
the macro should be to, say, start in cell C8 and edit it and take out
the leftmost character (which is a blank), and then move on to the next
row down in that column. Since some of the rows might be empty, it
would be better if we could just skip those, but it is not necessary.

In case it helps, I believe that all dates are in xx/yy/zz format (with
one spacebar in front).

Thanks!
Dean







  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 407
Default Macro command

It did not seem to help. In fact, all my old posts are now gone (except for
this last thread today). Is there any way I can get them back?

I did go to the URL and I did see the thread. I do not understand why it
does not show up in Outlook Express. I thank everyone for the ideas, all
good ones, though the edit replace is the easiest.

Thanks!
Dean

"Gary Keramidas" wrote in message
...
try resetting the newsgroup. it should show up.

--


Gary


"Dean" wrote in message
...
For some reason, when I checked in today, I did not see my post
yesterday. In fact, I still don't! I assume it is some quirk of Outlook
Express. Can you tell me the URL so I can view these answers directly,
although the two answers to my 2nd post are both excellent enough.

Sorry,
Dean

"Gary Keramidas" wrote in message
...
why not look at all the replies to your original post yesterday? no need
to post again

you could also do this:
select the entire column
click data and then text to columns
choose delimited
click next
put a check next to space under delimiters
click next and then finish

it will put the dates in the next column to the right. if you have data
there now, just insert a column to the right of the original "date"
field



--


Gary


"Dean" wrote in message
...
I have inherited a file with a column of dates. However, each data
apparently has a blank space in front of it, so it is not recognized as
a real date. Hence I cannot perform algebraic manipulations on them as
is.

I need to be able to go to each cell (thousands of them) in these
columns and take out this space on the left. Can someone tell me what
the macro should be to, say, start in cell C8 and edit it and take out
the leftmost character (which is a blank), and then move on to the next
row down in that column. Since some of the rows might be empty, it
would be better if we could just skip those, but it is not necessary.

In case it helps, I believe that all dates are in xx/yy/zz format (with
one spacebar in front).

Thanks!
Dean









  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Macro command

Hey Dean,

I had a similar problem for years. I was informed (on this very NG) that
accessing the newsgroups through my ISP's news server (which is what I
was doing) was most unreliable.

I was advised to switch to using the MS NNTP (news.microsoft.com). I did
and it's been perfect ever since.

Of course.... if you don't get to see this message then....

Good luck.
G

Dean wrote:
It did not seem to help. In fact, all my old posts are now gone (except for
this last thread today). Is there any way I can get them back?

I did go to the URL and I did see the thread. I do not understand why it
does not show up in Outlook Express. I thank everyone for the ideas, all
good ones, though the edit replace is the easiest.

Thanks!
Dean

"Gary Keramidas" wrote in message
...

try resetting the newsgroup. it should show up.

--


Gary


"Dean" wrote in message
...

For some reason, when I checked in today, I did not see my post
yesterday. In fact, I still don't! I assume it is some quirk of Outlook
Express. Can you tell me the URL so I can view these answers directly,
although the two answers to my 2nd post are both excellent enough.

Sorry,
Dean

"Gary Keramidas" wrote in message
. ..

why not look at all the replies to your original post yesterday? no need
to post again

you could also do this:
select the entire column
click data and then text to columns
choose delimited
click next
put a check next to space under delimiters
click next and then finish

it will put the dates in the next column to the right. if you have data
there now, just insert a column to the right of the original "date"
field



--


Gary


"Dean" wrote in message
...

I have inherited a file with a column of dates. However, each data
apparently has a blank space in front of it, so it is not recognized as
a real date. Hence I cannot perform algebraic manipulations on them as
is.

I need to be able to go to each cell (thousands of them) in these
columns and take out this space on the left. Can someone tell me what
the macro should be to, say, start in cell C8 and edit it and take out
the leftmost character (which is a blank), and then move on to the next
row down in that column. Since some of the rows might be empty, it
would be better if we could just skip those, but it is not necessary.

In case it helps, I believe that all dates are in xx/yy/zz format (with
one spacebar in front).

Thanks!
Dean







  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default Macro command

see if this gets you there

http://www.microsoft.com/office/comm...gramming&fltr=

--


Gary


"Dean" wrote in message
...
For some reason, when I checked in today, I did not see my post yesterday.
In fact, I still don't! I assume it is some quirk of Outlook Express.
Can you tell me the URL so I can view these answers directly, although the
two answers to my 2nd post are both excellent enough.

Sorry,
Dean

"Gary Keramidas" wrote in message
...
why not look at all the replies to your original post yesterday? no need
to post again

you could also do this:
select the entire column
click data and then text to columns
choose delimited
click next
put a check next to space under delimiters
click next and then finish

it will put the dates in the next column to the right. if you have data
there now, just insert a column to the right of the original "date" field



--


Gary


"Dean" wrote in message
...
I have inherited a file with a column of dates. However, each data
apparently has a blank space in front of it, so it is not recognized as a
real date. Hence I cannot perform algebraic manipulations on them as is.

I need to be able to go to each cell (thousands of them) in these
columns and take out this space on the left. Can someone tell me what
the macro should be to, say, start in cell C8 and edit it and take out
the leftmost character (which is a blank), and then move on to the next
row down in that column. Since some of the rows might be empty, it
would be better if we could just skip those, but it is not necessary.

In case it helps, I believe that all dates are in xx/yy/zz format (with
one spacebar in front).

Thanks!
Dean







Reply
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
Use Macro To Change Which Macro Assigned To Command Button CVinje Excel Discussion (Misc queries) 0 May 25th 10 09:55 PM
Macro command djungst Excel Discussion (Misc queries) 3 November 11th 08 05:01 AM
How to run a macro with the IF command deancarpenter Excel Worksheet Functions 4 July 26th 07 08:32 AM
macro command Param Excel Worksheet Functions 2 February 23rd 06 07:51 AM
macro command Shifting of Multiple Row to the right Excel Discussion (Misc queries) 3 September 15th 05 05:02 AM


All times are GMT +1. The time now is 11:11 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"