+ Reply to Thread
Results 1 to 10 of 10

If istext do something if not do something else

  1. #1
    Registered User
    Join Date
    01-08-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    4

    If istext do something if not do something else

    I have googled this and perhaps I am just missing something simple.
    I have three columns, one that tells me the action, one that tells me a deadline and one to give me the due date.
    I have one particular cell under deadline that says "Step 1 + 30 days if no XYZ or request for ABC, or Step 1 + 90 days if XYZ or request for ABC"
    XYZ is cell E8 and ABC is E3, step 1 is E2
    The formula I have been trying is:
    =IF(OR(E8=ISTEXT,E2+90,E3=ISTEXT,E2+90),E2+30)
    I have also tried
    =IF(ISTEXT(OR(E8,E2+90,E3,E2+90)),E2+30)
    However, both have errors, is there a link I can read up on, or something I am missing?
    I looked at 'if then' for excel, for example this site:
    https://blog.udemy.com/excel-if-then/
    And nesting excel functions.
    Thanks in advance.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: If istext do something if not do something else

    Try

    =E2+IF(OR(ISTEXT(E8),ISTEXT(E3)),90,30)

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: If istext do something if not do something else

    Try

    =E2+IF(AND(E8="",E3=""),30,90)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: If istext do something if not do something else

    Hi, welcome to the forum

    Perhaps this (untested)?
    =E2+if(or(E8<>"xyz",E3<>"ABC),30,90)

    Your description is a little confusing (for me, anyway), so If you still have a problem, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    01-08-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: If istext do something if not do something else

    Quote Originally Posted by Jonmo1 View Post
    Try

    =E2+IF(OR(ISTEXT(E8),ISTEXT(E3)),90,30)
    This worked, I had typed out a long reply but I followed your logic for same issue but different cell:
    =E3+IF(ISTEXT(E4)),40,20)
    Basically, Step 2 + 20 days, or Step 2 + 40 days, if Step 3.
    Step 2 is E3 and Step 3 is E4
    So I wanted it to add 40 days if there is text in E4 and if there is not, just add 20.
    Thanks so much!

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: If istext do something if not do something else

    You've got an extra ) in there

    =E3+IF(ISTEXT(E4)),40,20)


    It helps to count the (
    Then count the )
    They should both be the same.

  7. #7
    Registered User
    Join Date
    01-08-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: If istext do something if not do something else

    Quote Originally Posted by Jonmo1 View Post
    You've got an extra ) in there

    =E3+IF(ISTEXT(E4)),40,20)


    It helps to count the (
    Then count the )
    They should both be the same.
    This throws up an error as well, there is text in e4 and in e2 but I want it to add the 40 because there is text in e4, however Excel just says there's an error.

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: If istext do something if not do something else

    I didn't post a 'corrected' version of your formula.
    I only highlighted the error in red.

    The 'corrected' version would be
    =E3+IF(ISTEXT(E4),40,20)

  9. #9
    Registered User
    Join Date
    01-08-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: If istext do something if not do something else

    Quote Originally Posted by Jonmo1 View Post
    I didn't post a 'corrected' version of your formula.
    I only highlighted the error in red.

    The 'corrected' version would be
    =E3+IF(ISTEXT(E4),40,20)
    Thanks, its only adding the 20, if I add text to E4 it does not add 40.
    Thanks so much!

  10. #10
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: If istext do something if not do something else

    Works for me.

    Can you post a sample book?
    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] IF(ISTEXT is not working
    By dcdeez in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-16-2013, 12:07 PM
  2. ISTEXT with range
    By manu79 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-26-2013, 12:58 PM
  3. [SOLVED] nesting istext
    By mojobaabby in forum Excel General
    Replies: 1
    Last Post: 03-29-2013, 09:05 AM
  4. Replies: 6
    Last Post: 07-01-2010, 04:13 AM
  5. [SOLVED] ISTEXT
    By Micayla Bergen in forum Excel General
    Replies: 1
    Last Post: 05-18-2005, 10:06 PM

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