+ Reply to Thread
Results 1 to 7 of 7

RIGHT Function nested inside of IF

  1. #1
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Myrtle Beach, South Carolina
    MS-Off Ver
    =IF(Win 7,"Excel 2010","Mac Excel 2011")
    Posts
    104

    RIGHT Function nested inside of IF

    Hello,
    I am having a little trouble with an =IF statement. My formula is
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    But it doesn't acknowledge the Wildcard. Is there a different way of doing this. The end goal is If the 2nd to last character in a string is "P", then E3*F3, else E3.

    I tried looking at this post from last year, but can't grasp the concept behind it. Thanks, Jake

    http://www.excelforum.com/excel-gene...in-a-cell.html
    Last edited by jakeisbill; 10-16-2012 at 12:04 PM. Reason: SOLVED

  2. #2
    Forum Contributor
    Join Date
    10-02-2012
    Location
    Bumi Nusantara
    MS-Off Ver
    Excel 2010; Excel 2016
    Posts
    136

    Re: RIGHT Function nested inside of IF

    change your code with this one
    Please Login or Register  to view this content.
    click the star if it solves your problem

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: RIGHT Function nested inside of IF

    Try it like this:

    =IF(MID(H3,LEN(H3)-1,1)="P",E3*P3,E3)

    Hope this helps.

    Pete

  4. #4
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Myrtle Beach, South Carolina
    MS-Off Ver
    =IF(Win 7,"Excel 2010","Mac Excel 2011")
    Posts
    104

    Re: RIGHT Function nested inside of IF

    That works beautifully. Could I wrap an IFERROR around it to erase the #N/A and #VALUE errors?

  5. #5
    Forum Contributor
    Join Date
    10-02-2012
    Location
    Bumi Nusantara
    MS-Off Ver
    Excel 2010; Excel 2016
    Posts
    136

    Re: RIGHT Function nested inside of IF

    Quote Originally Posted by jakeisbill View Post
    That works beautifully. Could I wrap an IFERROR around it to erase the #N/A and #VALUE errors?
    since cell E3 has a value, you dont need IfError

  6. #6
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Myrtle Beach, South Carolina
    MS-Off Ver
    =IF(Win 7,"Excel 2010","Mac Excel 2011")
    Posts
    104

    Re: RIGHT Function nested inside of IF

    Sometimes it has a value, sometimes it doesn't.

  7. #7
    Forum Contributor
    Join Date
    10-02-2012
    Location
    Bumi Nusantara
    MS-Off Ver
    Excel 2010; Excel 2016
    Posts
    136

    Re: RIGHT Function nested inside of IF

    =IF(MID(H3,LEN(H3)-1,1)="P",E3*F3,E3)

    if E3 has no value, it will return to 0 (null), in my opinion you dont need IfError

+ 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