+ Reply to Thread
Results 1 to 8 of 8

need help with a formula

Hybrid View

  1. #1
    Registered User
    Join Date
    06-02-2014
    Posts
    4

    need help with a formula

    I need help with building a formula for the below

    only if A1=1 and B1= M or H then C1 would return a 1 result

    the other A1 options would be blank and the other B1 options would be a L or none

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: need help with a formula

    Hi,

    Welcome to the Forum.

    Please paste the following formula in C1:

    =IF(AND(A1=1,B1="M"),1,"")

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

    Re: need help with a formula

    I think you've missed the condition for "H" - try this amendment:

    =IF(AND(A1=1,OR(B1="M",B1="H")),1,"")

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    06-02-2014
    Posts
    4

    Re: need help with a formula

    agh thank you - trying it now

  5. #5
    Registered User
    Join Date
    06-02-2014
    Posts
    4

    Re: need help with a formula

    Worked beautifully thank you both

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

    Re: need help with a formula

    You're welcome - glad to be able to help.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, I would like to inform you that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  7. #7
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: need help with a formula

    Updated one, missed to see B1 = M or H

    =IF(AND(A1=1,OR(B1="M",B1="H")),1,"")

  8. #8
    Registered User
    Join Date
    06-02-2014
    Posts
    4

    Re: need help with a formula

    Hi, thank you for the welcome - clearly i was putting the AND in the wrong place
    could I add the H as below?
    =IF(AND(A1=1,B1="M","H"),1,"")

+ 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. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 PM

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