+ Reply to Thread
Results 1 to 3 of 3

Using IF Functions with multiple variables and ranges

  1. #1
    Registered User
    Join Date
    12-05-2012
    Location
    bris
    MS-Off Ver
    Excel 2003
    Posts
    3

    Using IF Functions with multiple variables and ranges

    Hi,

    I am trying to create an IF fucntion that when a cell is a number it will input a value that is that number in question + 1, however the cell that is referenced also contains - and letters to represnts alpha and numeric revisions of a document.

    Currently I have tried the follow code:
    =IF(11>AA3>=0,AA3+1,IF(AA3="A",0,IF(AA3="B",0,IF(AA3="C",0,IF(AA3="D",0,IF(AA3="E",0,IF(AA3="-",0,0)))))))

    However this ends up in an "VALUE#!" error. What would be the best way to say, if the cell (AA3) is A,B,C,D,E,F or - then = 0 while if the cell (AA3) is 0,1,2,3,4 etc. then = that number + 1?

    Any help would be greatly appreciated.

    Thanks,
    Nick

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Using IF Functions with multiple variables and ranges

    hi Nick, welcome to the forum. if there are only 2 scenarios possible (Letters/"-" OR numbers), try:
    =IF(ISNUMBER(AA3),AA3+1,0)

    if there are other possibilities, and you need something more specific like you mentioned then:
    =IF(OR(AA3="-",AND(CODE(UPPER(AA3))>=65,CODE(UPPER(AA3))<=70)),0,IF(AND(AA3>=0,AA3<=4),AA3+1,""))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    12-05-2012
    Location
    bris
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Using IF Functions with multiple variables and ranges

    Thanks for your help, the first formulae looks to be the one I was chasing.

+ 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