+ Reply to Thread
Results 1 to 3 of 3

Looking for a function for multiple conditions

  1. #1
    Registered User
    Join Date
    03-17-2006
    Posts
    49

    Looking for a function for multiple conditions

    I'm looking for a formula where two conditions are met. i.e. I would like to see the information in cell F1 appear in G1 if D1=San Diego and B1=Y or I would like it left blank if the conditions are not met.

    Thank you for your help
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Try SUMPRODUCT in cell G1:

    =SUMPRODUCT(--(D1="San Diego")*(B1="Y")*(F1))

    This will return F1 if both conditions are met or 0 if they are not met. If you want to return blank instead of zero, use:

    =IF(SUMPRODUCT(--(D1="San Diego")*(B1="Y")*(F1))=0,"",SUMPRODUCT(--(D1="San Diego")*(B1="Y")*(F1)))

  3. #3
    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
    Hi,

    Try

    =IF(AND(B1="Y",D1="San Diego"),F1,"")

    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 !!!

+ 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