View Single Post
 
Old 04-18-2018, 07:27 AM
rsrasc rsrasc is offline Windows 10 Office 2013
Competent Performer
 
Join Date: Mar 2014
Location: Germany
Posts: 148
rsrasc is on a distinguished road
Default Need Word Macro to Delete Text

Hi all,

I have a document with over 500 pages. and I would like to be able to delete all the text between the word DOLLAR VALUE and the information after that.

Here is how the information is showing in the document:

HTML Code:
 
BRITTANY 1
 
    SICK LEAVE   REGULAR HOURS                            7.50                 77.50                      40.25
 
    ANNUAL LEAVE REGULAR HOURS                            7.50     19.75
                 DOLLAR VALUE
 
KARIN 1
 
    SICK LEAVE   REGULAR HOURS       4.00                14.75      7.50      286.00
 
    ANNUAL LEAVE REGULAR HOURS       5.75                21.25                261.25   89.25
                 DOLLAR VALUE       65.44                                    2973.03
 
LACOURTNEY 1
 
    SICK LEAVE   REGULAR HOURS                                                 14.50
 
    ANNUAL LEAVE REGULAR HOURS                59.50                59.50
                 DOLLAR VALUE                631.30*
 
ALYSSA 1 
 
    SICK LEAVE   REGULAR HOURS       3.50                15.00                105.25
 
    ANNUAL LEAVE REGULAR HOURS       3.50                15.00                 37.75
                 DOLLAR VALUE       37.49                                     404.30

Here is how the information should looks after applying the macro:

HTML Code:
BRITTANY 1
 
    SICK LEAVE   REGULAR HOURS                            7.50                 77.50                      40.25
 
    ANNUAL LEAVE REGULAR HOURS                            7.50     19.75
 
 
KARIN 1
 
    SICK LEAVE   REGULAR HOURS       4.00                14.75      7.50      286.00
 
    ANNUAL LEAVE REGULAR HOURS       5.75                21.25                261.25   89.25
 
 
LACOURTNEY 1
 
    SICK LEAVE   REGULAR HOURS                                                 14.50
 
    ANNUAL LEAVE REGULAR HOURS                59.50                59.50
 
 
ALYSSA 1 
 
    SICK LEAVE   REGULAR HOURS       3.50                15.00                105.25
 
    ANNUAL LEAVE REGULAR HOURS       3.50                15.00                 37.75
 
So, basically I would like to have a macro so I can delete the word DOLLAR VALUE and any numbers after that word but not deleting the next letter or name available

As always, thank you in advance for your assistance and cooperation.

Regards!
Reply With Quote