+ Reply to Thread
Results 1 to 6 of 6

IF function

  1. #1
    Registered User
    Join Date
    11-02-2009
    Location
    NM, USA
    MS-Off Ver
    Excel 2003
    Posts
    26

    IF function

    Hi
    I have the following If function but I need to add that if all of this is false then return the value that is in cell P2. Can anyone help?

    =IF(Q191=4,"1",IF(Q191=3,"2",IF(Q191=2,"3",IF(Q191=1,"4",IF(Q191=5,P191)))))

    Thanks

  2. #2
    Registered User
    Join Date
    11-01-2011
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: IF function

    try:

    =IF(IF(Q191=4,"1",IF(Q191=3,"2",IF(Q191=2,"3",IF(Q191=1,"4",IF(Q191=5,P191)))))=FALSE,P2, IF(Q191=4,"1",IF(Q191=3,"2",IF(Q191=2,"3",IF(Q191=1,"4",IF(Q191=5,P191))))))

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: IF function

    Try:

    =IF(Q191=4,"1",IF(Q191=3,"2",IF(Q191=2,"3",IF(Q191=1,"4",IF(Q191=5,P191,P2)))))

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094

    Re: IF function

    Hi,

    You can try this:

    =IF(OR(Q191<1,Q191>5),P2,CHOOSE(Q191,Q191+3,Q191+1,Q191-1,Q191-3,Q191))

    HTH

    Steve

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: IF function

    Try this
    Please Login or Register  to view this content.
    Hope this helps
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  6. #6
    Registered User
    Join Date
    11-02-2009
    Location
    NM, USA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: IF function

    Thanks! works!

+ 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.6.0 RC 1