+ Reply to Thread
Results 1 to 11 of 11

AND / OR in formulas?

  1. #1
    Registered User
    Join Date
    09-30-2010
    Location
    Leeds, England
    MS-Off Ver
    Excel 2008
    Posts
    4

    Thumbs up AND / OR in formulas?

    Morning all,

    It has been a while since I have had to used AND / OR within a function / formula.

    Please can anyone help me with the formula below, just cannot get it to work:-

    =IF(B23,"ATTENDED"," ")*OR(B24,"REQUESTED"," ")

    All assistance gratefully received.

    Thanks
    Ross
    Last edited by Elsdro; 09-30-2010 at 06:16 AM.

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: AND / OR in formulas?

    AND and OR are a bit strange in functions, try this...

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-30-2010
    Location
    Leeds, England
    MS-Off Ver
    Excel 2008
    Posts
    4

    Re: AND / OR in formulas?

    Andrew -R - thanks for the help.

    I don't think I gave a good explaination, apologies:-

    What I have is a control box for a REQUESTED (B24), then a contol box for ATTENDED (B23).

    I need to display either REQUESTED or ATTENDED in (D23) based on which control box is selected.

    Thanks again

  4. #4
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: AND / OR in formulas?

    Sorry, what do you mean by "control box"? An example sheet may be the way to go here.

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,320

    Re: AND / OR in formulas?

    Do you mean:
    =IF(B23,"ATTENDED",IF(B24,"REQUESTED",""))
    Everyone who confuses correlation and causation ends up dead.

  6. #6
    Registered User
    Join Date
    09-30-2010
    Location
    Leeds, England
    MS-Off Ver
    Excel 2008
    Posts
    4

    Thumbs up Re: AND / OR in formulas?

    I have attached an example, your help is much appreciated.

    Cheers
    Ross
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-30-2010
    Location
    Leeds, England
    MS-Off Ver
    Excel 2008
    Posts
    4

    Smile Re: AND / OR in formulas?

    Quote Originally Posted by romperstomper View Post
    Do you mean:
    =IF(B23,"ATTENDED",IF(B24,"REQUESTED",""))

    Thanks, that has solved the issue.

  8. #8
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: AND / OR in formulas?

    Elsdro,

    there is no code behind your checkbox. What do you expect to happen? If you use an ActiveX control, you have to write code that does something when the control is clicked.

    You may be better off using a check box from the Forms toolbar instead and linking the check box to a cell, which in turn can be evaluated by a formula without any VBA.

  9. #9
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: AND / OR in formulas?

    I see that you state your Office version as 2008. Does that mean you are running Office 2008 for Mac? In this case, you won't be able to use VBA at all. So, stay clear of ActiveX controls and use Form controls instead.

  10. #10
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,320

    Re: AND / OR in formulas?

    Quote Originally Posted by teylyn View Post
    there is no code behind your checkbox. What do you expect to happen? If you use an ActiveX control, you have to write code that does something when the control is clicked.
    Not true, actually - you can just set the LinkedCell property as was done here, but your point about 2008 applies - you can't use ActiveX controls at all there (even without VBA)

  11. #11
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: AND / OR in formulas?

    actually - you can just set the LinkedCell property
    duhh!! Thanks, romperstomper.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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