Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
larry larry is offline
external usenet poster
 
Posts: 79
Default delete 2 columns from text file using find and replace or other me

have a tex file fixed length record trying to import into sql server won't
date convert a mmddyyyy need to delete the 2 columns in the text file opened
in word by using find and replace or some other method.....anyone know how to
group delete on 2 specified columns? Need to remove the first 2 bytes of the
year
--
Larry
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
CyberTaz CyberTaz is offline
external usenet poster
 
Posts: 1,291
Default delete 2 columns from text file using find and replace or other me

Two options that don't require any fancy syntax or VBA:

Hold the Alt key while you drag to select jsut the first two digits of the
years, then press Delete, or

Hold the Alt key while you drag to select the column of year data then run
F/R to locate 19, replace with nothing. If there are any likely occurences
of 1919, of course, you don't want to use Replace All :-) Just be sure to
say "NO" when asked if you want to start from the beginning. If necessary
repeat for years beginning with 20.

--
HTH |:)
Bob Jones
Office:Mac MVP

"Larry" wrote in message
...
have a tex file fixed length record trying to import into sql server won't
date convert a mmddyyyy need to delete the 2 columns in the text file
opened
in word by using find and replace or some other method.....anyone know how
to
group delete on 2 specified columns? Need to remove the first 2 bytes of
the
year
--
Larry


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
larry larry is offline
external usenet poster
 
Posts: 79
Default delete 2 columns from text file using find and replace or othe

only problem is this text file has almost 10,000 records....is there a way to
identify specific columns to delete. I am well aware of how to use the find
and replace and all it's options but thought maybe something else was
available to perform what I need done....i either find a way to edit this
text file or rerun a mainframe extract pgm that takes 4 hrs to finish.

Any other ideas come to light?
--
Larry


"CyberTaz" wrote:

Two options that don't require any fancy syntax or VBA:

Hold the Alt key while you drag to select jsut the first two digits of the
years, then press Delete, or

Hold the Alt key while you drag to select the column of year data then run
F/R to locate 19, replace with nothing. If there are any likely occurences
of 1919, of course, you don't want to use Replace All :-) Just be sure to
say "NO" when asked if you want to start from the beginning. If necessary
repeat for years beginning with 20.

--
HTH |:)
Bob Jones
Office:Mac MVP

"Larry" wrote in message
...
have a tex file fixed length record trying to import into sql server won't
date convert a mmddyyyy need to delete the 2 columns in the text file
opened
in word by using find and replace or some other method.....anyone know how
to
group delete on 2 specified columns? Need to remove the first 2 bytes of
the
year
--
Larry



  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default delete 2 columns from text file using find and replace or other me

Use a wildcard search for
([0-9]{4})[0-9]{2}([0-9]{2})
replace with \1\2

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Larry wrote:
have a tex file fixed length record trying to import into sql server
won't date convert a mmddyyyy need to delete the 2 columns in the
text file opened in word by using find and replace or some other
method.....anyone know how to group delete on 2 specified columns?
Need to remove the first 2 bytes of the year



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
larry larry is offline
external usenet poster
 
Posts: 79
Default delete 2 columns from text file using find and replace or othe

Wildcard search would still change any other data with 19 or 20 in the text
right.

How would you use it?
--
Larry


"Graham Mayor" wrote:

Use a wildcard search for
([0-9]{4})[0-9]{2}([0-9]{2})
replace with \1\2

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Larry wrote:
have a tex file fixed length record trying to import into sql server
won't date convert a mmddyyyy need to delete the 2 columns in the
text file opened in word by using find and replace or some other
method.....anyone know how to group delete on 2 specified columns?
Need to remove the first 2 bytes of the year






  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default delete 2 columns from text file using find and replace or othe

The wildcard search in question would only affect 8 digit numbers, which
would be your dates.
You could limit it further with
([0-9]{4})[0129]{2}([0-9]{2})
How would you use it?
Open the document
CTRL+H
in the find box copy and paste
([0-9]{4})[0129]{2}([0-9]{2})
in the replace box type
\1\2
Check 'More'
Check the wildcard box
Replace all

If you have other 8 digit numbers that are not dates, send me a sample of
the data (a few records only) to the link on the home page of my web site.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Larry wrote:
Wildcard search would still change any other data with 19 or 20 in
the text right.

How would you use it?

Use a wildcard search for
([0-9]{4})[0-9]{2}([0-9]{2})
replace with \1\2

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Larry wrote:
have a tex file fixed length record trying to import into sql server
won't date convert a mmddyyyy need to delete the 2 columns in the
text file opened in word by using find and replace or some other
method.....anyone know how to group delete on 2 specified columns?
Need to remove the first 2 bytes of the year



  #7   Report Post  
Posted to microsoft.public.word.docmanagement
larry larry is offline
external usenet poster
 
Posts: 79
Default delete 2 columns from text file using find and replace or othe

Works like a charm....you ARE the MAN.... saved me from re-running a 4 hr
extract job. Many Thanks
--
Larry


"Graham Mayor" wrote:

The wildcard search in question would only affect 8 digit numbers, which
would be your dates.
You could limit it further with
([0-9]{4})[0129]{2}([0-9]{2})
How would you use it?
Open the document
CTRL+H
in the find box copy and paste
([0-9]{4})[0129]{2}([0-9]{2})
in the replace box type
\1\2
Check 'More'
Check the wildcard box
Replace all

If you have other 8 digit numbers that are not dates, send me a sample of
the data (a few records only) to the link on the home page of my web site.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Larry wrote:
Wildcard search would still change any other data with 19 or 20 in
the text right.

How would you use it?

Use a wildcard search for
([0-9]{4})[0-9]{2}([0-9]{2})
replace with \1\2

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Larry wrote:
have a tex file fixed length record trying to import into sql server
won't date convert a mmddyyyy need to delete the 2 columns in the
text file opened in word by using find and replace or some other
method.....anyone know how to group delete on 2 specified columns?
Need to remove the first 2 bytes of the year




  #8   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default delete 2 columns from text file using find and replace or othe

You are welcome

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Larry wrote:
Works like a charm....you ARE the MAN.... saved me from re-running a
4 hr extract job. Many Thanks

The wildcard search in question would only affect 8 digit numbers,
which would be your dates.
You could limit it further with
([0-9]{4})[0129]{2}([0-9]{2})
How would you use it?
Open the document
CTRL+H
in the find box copy and paste
([0-9]{4})[0129]{2}([0-9]{2})
in the replace box type
\1\2
Check 'More'
Check the wildcard box
Replace all

If you have other 8 digit numbers that are not dates, send me a
sample of the data (a few records only) to the link on the home page
of my web site.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Larry wrote:
Wildcard search would still change any other data with 19 or 20 in
the text right.

How would you use it?

Use a wildcard search for
([0-9]{4})[0-9]{2}([0-9]{2})
replace with \1\2

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Larry wrote:
have a tex file fixed length record trying to import into sql
server won't date convert a mmddyyyy need to delete the 2 columns
in the text file opened in word by using find and replace or some
other method.....anyone know how to group delete on 2 specified
columns? Need to remove the first 2 bytes of the year



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
delete sewctions of text using find and replace Bonni Microsoft Word Help 7 May 20th 07 07:41 PM
find, replace, delete Ben Microsoft Word Help 5 May 11th 06 04:06 PM
find and replace = delete Ben Microsoft Word Help 3 May 11th 06 06:13 AM
Find and Replace: delete a line & find a number 10 Janis Anna Microsoft Word Help 3 October 23rd 05 05:53 AM
find, block - goto replace or delete Brent Hauver Formatting Long Documents 1 February 4th 05 08:46 PM


All times are GMT +1. The time now is 09:11 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"