+ Reply to Thread
Results 1 to 3 of 3

If cell doesn't contain text, populate nothing in another cell?

  1. #1
    Registered User
    Join Date
    04-12-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    4

    If cell doesn't contain text, populate nothing in another cell?

    Column E = Message Text
    Column I = Numeric Value (populated field from Column E)

    Column E may contain a message like, "Processing steps".
    Or, it could contain a message like, "Processing steps. Header:1, Lines: 123."

    If column E contains the word "Lines: ", I need to populate Column I with the number after the word 'Lines: '.
    There is also a period at the end of the string that I do not want to include.


    Here is what I have so far...

    =INT(MID(E4,FIND("Lines: ",E4)+7,LEN(E4)

    This works great if the specified word is found, but produces a #Value! if not found.

    My question is, if column E doesn't contain "Lines: (numeric value).", how can I populate Column I to output nothing?
    I understand I need to create an IF statement, but not sure how.

    Any suggestions?
    Last edited by MissMeliss; 04-12-2012 at 07:31 PM.

  2. #2
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: If cell doesn't contain text, populate nothing in another cell?

    Try this out

    =IF(ISNUMBER(FIND("Lines:",A1)),TRIM(MID(A1,FIND("Lines:",A1)+6,FIND(".",A1,FIND("Lines:",A1)+7)-FIND("Lines:",A1)-6)))
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  3. #3
    Registered User
    Join Date
    04-12-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: If cell doesn't contain text, populate nothing in another cell?

    Perfect - I thank you kindly.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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