+ Reply to Thread
Results 1 to 8 of 8

Multiple IF statements in 1 cell

  1. #1
    Registered User
    Join Date
    01-27-2009
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Multiple IF statements in 1 cell

    Hi Guys

    Nice to be here.

    I have a question that need help please. I want to add 2 cell together A1 + A2 then that answer multiplied by 2 with an if and an else statement I think.


    For example
    Lets just say after the second equals sign is cell A3 (400)

    100 + 100 = 200*2 = 400. if a3 <=500 then *29 if A3=>501 but less than 700 then * 24 if A3 =>701 but less than 900 then * 19 if =>901 but less than 1100 then * 17 etc etc

    So in the example above the sum equals 400 so the sum is 400*29 but if it was 250 + 250 it would equal 1000 so 1000*17

    Pheeew

    Hope thats clearer to you guys.

    Thanks for any help

    Regards
    Last edited by rbondy007; 01-27-2009 at 07:16 PM.

  2. #2
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Re: Help please

    HI

    You can use a nested IF statement but that only allows for 7 IF's, how many do you have in total ?

    Regards

    Jeff

  3. #3
    Registered User
    Join Date
    01-27-2009
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Help please

    Hi

    7 would be the most but if I needed to I would expand the range to allow for 6. It doesn't matter to me if they are IF staements, whatever works

    Thanks
    Last edited by rbondy007; 01-27-2009 at 02:03 PM.

  4. #4
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Re: Help please

    Hi

    The following example can be adjusted to your needs.
    Please Login or Register  to view this content.
    Regards

    Jeff

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Help please

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  6. #6
    Registered User
    Join Date
    01-27-2009
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Help please

    Hi,
    Firstly my thanks to Jeff for replying to the post and secondly I apologise to the moderator for the title.

    Hi Jeff, unfortunately the code didn't work?
    Regards

  7. #7
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: Help please

    I apologise to the moderator for the title
    Thanks for the apology but you still need to change the title or this thread will be closed

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  8. #8
    Registered User
    Join Date
    01-27-2009
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Multiple IF statements in 1 cell

    Hi

    Finally done it by adding another cell to do the sum

    =IF(D1<=1,D1*60,IF(D1<=1.4,D1*48,IF(D1<=1.8,D1*46,IF(D1<=2.2,D1*46,IF(D1<=2.6,D1*46, IF(D1<=3,D1*46, IF(D1<=3.4,D1*46)))))))

    Thanks Jeff you led me in the right direction

+ 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