+ Reply to Thread
Results 1 to 3 of 3

Thread: Function for characters

  1. #1
    ToddFisk
    Guest

    Function for characters

    I need to have a formula similar to:
    =LEFT(E52,70)
    but I need to make sure that it does not break up word.
    IE...make a formula choose the word that is less than 70 characters long and
    everything before it.

    Then...I need the next cell below it to show the rest of the text string to
    a point

    Basically...I am trying to wrap text without wrapping text into one cell and
    use multiple cells.

    Is this possible

  2. #2
    Duke Carey
    Guest

    RE: Function for characters

    Here's a UDF that will give you the first part. To get the second part
    you'll have to use the RIGHT and LEN functions


    Public Function Seventy(strText As String) As String
    Dim strTextRev
    Dim intSpace

    Application.Volatile

    strTextRev = StrReverse(Left(strText, 70))
    intSpace = 71 - InStr(1, strTextRev, " ")
    Seventy = Left(strText, intSpace)

    End Function



    "ToddFisk" wrote:

    > I need to have a formula similar to:
    > =LEFT(E52,70)
    > but I need to make sure that it does not break up word.
    > IE...make a formula choose the word that is less than 70 characters long and
    > everything before it.
    >
    > Then...I need the next cell below it to show the rest of the text string to
    > a point
    >
    > Basically...I am trying to wrap text without wrapping text into one cell and
    > use multiple cells.
    >
    > Is this possible


  3. #3
    ToddFisk
    Guest

    RE: Function for characters

    I don't understand how to make that work - is this part of qbasic?

    "Duke Carey" wrote:

    > Here's a UDF that will give you the first part. To get the second part
    > you'll have to use the RIGHT and LEN functions
    >
    >
    > Public Function Seventy(strText As String) As String
    > Dim strTextRev
    > Dim intSpace
    >
    > Application.Volatile
    >
    > strTextRev = StrReverse(Left(strText, 70))
    > intSpace = 71 - InStr(1, strTextRev, " ")
    > Seventy = Left(strText, intSpace)
    >
    > End Function
    >
    >
    >
    > "ToddFisk" wrote:
    >
    > > I need to have a formula similar to:
    > > =LEFT(E52,70)
    > > but I need to make sure that it does not break up word.
    > > IE...make a formula choose the word that is less than 70 characters long and
    > > everything before it.
    > >
    > > Then...I need the next cell below it to show the rest of the text string to
    > > a point
    > >
    > > Basically...I am trying to wrap text without wrapping text into one cell and
    > > use multiple cells.
    > >
    > > Is this possible


+ Reply to 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.2.0