Closed Thread
Results 1 to 2 of 2

telling the code to stop at line breaks

  1. #1
    Registered User
    Join Date
    06-25-2007
    Posts
    1

    telling the code to stop at line breaks

    Hello, new to the fourm, my spelling is horrible and I will get straight to the question.

    I have three (very long collumes). The first collume is just the equipment number. The second has numbers repersenting other information (aka 1 means to inspect). The third collume is the time peirod that you need to do the thing in the first collume (aka every 2 weeks or daily).

    The problem is each cell has mutliple line breaks in it. For example one cell may look like this

    1,3,5
    2,7
    1-4 & 8

    and the cell beside it may look like this

    weekly

    daily

    *note there are spaces in the second collume...

    My goal is to have someone say we recived this equipemtn (aka a check box or something) and for the computer to make a calender of what days what equipment needs to be maintained.

    I was using the code InStr(check + 1, Cell, ",", 1) before when i had everything separted in a differnt collume by commas, and this would tell me where the differnt strings started and ended. I then used Mid(Cell, check + 1, fun - 1) to grab that string (the variable are not that important here).

    My big problem is i have no way of telling the code to stop at line breaks like i did with the commas.

    I am looking for a way to maybe make a seimi colan after each line break, which i don't want to do manual being there is 1400 rows with an average of about 2 breaks per row and also two collumes. I tried using the list part of excel, but i am extreamly sketchy on it and it doesn't like blank line breaks. I also tried "Delimated" but it misses the spaces also. I would prefer just to use code also

    Anyway, any help will be greatly appreated!

    Sorry horrible spelling

    Kavy

    PS - if i new the ascii code for a line break, would that make my job very easy?

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Thread closed for cross posting.

    Please read forum rules below. If you agree to them then PM me and I will unlock this thread

    http://www.mrexcel.com/board2/viewto...light=#1345789

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1