Posts by Jeff P

    I'm in need of a script that increases a single increment from the upper value within blank rows.

    To go from this: ( in Column "D")


    _000




    _145

    _153

    _179





    _298






    _400


    ....to this:


    _000

    _001

    _002

    _003

    _145

    _153

    _179

    _180

    _181

    _182

    _183

    _298

    _299

    _300

    _301

    _302

    _303

    _400


    Thanks!

    Jeff

    I have a named Range called "SEQ" in Column C that spans about 4000 rows.
    Within this Range are various markers. "x"
    New rows are routinely added.
    I'm in need of a VBA script that will add a numerical sequence between these markers, in this named Range.


    -- from this:


    C
    x




    x


    x





    x


    ---to this.
    C
    x
    1
    2
    3
    x
    1
    x
    1
    2
    3
    4
    x

    Many thanks!

    Re: offset from first coulmn


    Thanks for the replies.


    Pike, thanks for the code, but still offsets the x value to the right of the word itself.


    Smallman, Thanks! I've uploaded a sample file of what im trying to achieve. there are two sheets: a before and after result, if that makes sense.


    The code searches for the text in A1 "time" from a named range "Outline_07", then offsets an "x" mark 4 columns from the left, if it appears.


    Thanks for the help.
    Jeff

    Hello


    I came across this script, which I've modified
    It searches for a specified name from "A1", within the range "Outline_07"
    and offsets an "X" mark 13 cells to the right, of where it appears in that row.


    It works great.


    But is it possible to modify this such that it no longer offsets the "X" mark from where the name appears in the row, but rather places the "X" mark always in Column 10.


    Tried countless variations but cant get it to work!...
    Thanks for any help.



    Hello,




    I came across this code which counts the number of words within a selection.


    Works great!




    Is it possible to modify this such that instead of displaying the word count via a message box, it shows only the number result (not the text) within a cell / named range?



    lets says: Range ("WordCount")



    Thanks for any help!

    Hello



    Im in need of a vba macro which will find text within a column and indicate which row contains this text.


    As an example: in A1 a key word is typed in ( which will vary), and in column A14:A500 I have a list of paragraph text information in each row.



    The macro will search column A14:A500 for the name that's typed in A1.. if it finds it, offsets an "X" , 3 columns to the right... if it doesn't find it.. it does nothing.


    Any ideas how to create this?



    Many Thanks!

    Re: Export to separate txt files


    Thanks apo


    Yes they will always be numerically ascending.. and may look something like this



    Heading01_00.00
    Heading01_01.00
    Heading01_02.00
    Heading01_03.00
    Heading01_03.50
    Heading01_03.55
    Heading01_04.00


    etc.


    and the format will never get past 2 digits.


    Thanks again for the help!


    Jeff

    Re: Export to separate txt files


    Thanks for the reply, snb



    If my worksheet heading list is this:



    Heading01
    Lorem ipsum dolor sit amet, no soluta apeirian pri.
    Has luptatum voluptatibus te, tale adhuc fierent



    Heading02
    No laoreet neglegentur eam, ut sumo discere voluptua vim.
    feugait his, primis aliquip sit te


    Heading03
    Viderer ornatus dolorum vel te. Id etiam
    Est persecuti percipitur te


    -------------------------------------



    It will create 3 text files with their respected contents.
    Heading01.txt
    Heading02.txt
    Heading03.txt



    ..but each text file will also include their numerical increment as the first line.



    01
    Lorem ipsum dolor sit amet, no soluta apeirian pri.
    Has luptatum voluptatibus te, tale adhuc fierent


    02
    No laoreet neglegentur eam, ut sumo discere voluptua vim.
    feugait his, primis aliquip sit te


    03
    Viderer ornatus dolorum vel te. Id etiam
    Est persecuti percipitur te




    Hope that helps..


    thanks!

    Re: Export to separate txt files


    Hello..



    This code works great John!, But Im wondering if it could be possibly modified to incorporate underscores within the heading?



    I've needed to change my heading titles, whereupon the script no longer work when there's an underscore within the title heading.



    Is it possible for this script to work for headings such as this?
    Heading01_01.00
    Heading01_02.00
    Heading01_03.00
    Heading01_04.00





    Also thanks to snb who also provided a working code..( which does allow for underscores!, ...but it also includes the increment at the head of the body of text in the new file..which is undesirable.)



    Thanks for any help.


    Jeff

    Is there a macro which will allow me to export any text between the words "Heading" into their own .txt document? (while keeping the proper heading name as the text file?)
    As an example. from this:


    Heading01
    definiebas pro. Sea ne option erroribus. Duo ut meis tamquam appa


    Heading03
    Ea zril explicari definiebas pro. Sea ne option errori
    ne option erroribus. Duo ut meis tamqua


    Heading08
    explicari definiebas pro. Sea ne option erroribus. Duo ut meis tamqua


    ---
    to this..
    output to separate text file in C:\Users\JeffP\Documents\Temp


    Heading01.txt
    Heading03.txt
    Heading08.txt


    Thanks for any help..!


    Jeff

    Re: Remove BOM characters


    Thanks pike.. couldn't get either one to work.. getting an error upon importing.


    However I managed to fix my problem. Discovered my text files were somehow being saved as UTF-8. Manually re saved each file individually as ANSI .. a major pain but it worked.


    Thanks for the help!


    Jeff

    When I import a text file its also importing BOM characters ie: 


    Which is giving me errors with other macros.


    How can I modify the following code to exclude these character markings?



    Thanks for any help


    Jeff



    Code
    Sub ImportTextFile_00()
        Set myTextFile = Workbooks.Open("Z:\ImoprtFiles\Text_00.txt")
        myTextFile.Sheets(1).Range("B2").CurrentRegion.Copy _
             ThisWorkbook.Sheets(1).Range("B2")
    myTextFile.Close (False)
    End Sub