+ Reply to Thread
Results 1 to 8 of 8

Formula help

  1. #1
    Registered User
    Join Date
    11-25-2012
    Location
    sf
    MS-Off Ver
    Excel 2010
    Posts
    2

    Formula help

    I have this current formula

    =IF(B40="CCG",IF(N40="W",1,0),0)


    Currently if b40 ccg is in b40 and n40 has a w entered then it returns 1, if not 0. I am trying to change this so that if b40 is ccg and either w or x is inputed into n40 it returns a 1 and if not 0, I am really struggling to make this work, any help would be much appreciated please.


    James

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Formula help

    =IF(B40="CCG",IF(OR(N40="W",N40="X"),1,0),0)

    Hope this Helps
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Formula help

    or as an alternative

    =IF(B40="CCG",OR(N40="W",N40="X)*1,0)

  4. #4
    Registered User
    Join Date
    11-25-2012
    Location
    sf
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Formula help

    Quote Originally Posted by dredwolf View Post
    =IF(B40="CCG",IF(OR(N40="W",N40="X"),1,0),0)

    Hope this Helps
    Thank you so much, you're a lifesaver.

  5. #5
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Formula help

    You are welcome !

  6. #6
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Formula help

    How about
    =(B40="CCG")*((N40="X")+(N40="W"))
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  7. #7
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Formula help

    @mikerickson
    Nice! Gets rid of the IF altogether, I like it

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Formula help

    Mr Meow,

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem. Once you have done this please send me a PM and I will remove this request.

    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.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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