Closed Thread
Results 1 to 10 of 10

Logical if

  1. #1
    Registered User
    Join Date
    04-02-2007
    Posts
    40

    Logical if

    Hi all,
    Am a newbee in Excel.
    My requirement is ....
    I have a list of customers with their payments status such as "Quarterly (Q), Half Yearly (H) and Yearly(Y)

    Now what i am looking is a formula which checks basing on the column where Q, H and Y are existing and in the next 4 columns (column headings are Q1,Q2,Q3 and Q4) it should put ...........

    1. all "YES" in all 4 columns if the cell says Q,
    2. only first 2 columns it should put "Yes" and rest 2 columns "No", if the cell say H and
    3. only first column it should put "Yes" and rest 3 columns "No", if the cell says Y

    Hope i am clearing in asking the question.

    Thanks in advance.
    Last edited by oldchippy; 12-23-2008 at 05:55 AM.

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

    =IF($H2="Q","Yes",IF(AND($H2="H",OR(I$1={"Q1","Q2"})),"Yes",IF(AND($H2="Y",I$1="Q1"),"Yes","No")))

    Where your Q,H,Y are placed in A2, down and your Q1 - Q4 headers begin in B1
    Last edited by NBVC; 12-22-2008 at 09:10 AM.
    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.

  3. #3
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671
    I think this is what you need:
    Attached Files Attached Files
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  4. #4
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444
    Hi,

    presuming your Q H Y data is in column A,

    Q1 =IF($A2="Q","YES",IF($A2="H","YES",IF($A2="Y","YES","")))
    Q2 =IF($A2="Q","YES",IF($A2="H","YES",IF($A2="Y","NO","")))
    Q3 =IF($A2="Q","YES",IF($A2="H","NO",IF($A2="Y","NO","")))
    Q4 =IF($A2="Q","YES",IF($A2="H","NO",IF($A2="Y","NO","")))
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  5. #5
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    If B1:E1 =Q1,Q2,Q3,Q4

    =IF($A2="Q","Yes",IF(AND(OR(B$1="Q1",B$1="Q2"),$A2="H"),"Yes",IF(AND($A2="Y",B$1="Q1"),"Yes","No"))) drag across and down
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by oldchippy View Post
    Hi,

    If B1:E1 =Q1,Q2,Q3,Q4

    =IF($A2="Q","Yes",IF(AND(OR(B$1="Q1",B$1="Q2"),$A2="H"),"Yes",IF(AND($A2="Y",B$1="Q1"),"Yes","No"))) drag across and down
    Looks familiar...

  7. #7
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Sorry, I was working on it, got dragged away, so by the time I got back I thought I'd post it any way just in case

  8. #8
    Registered User
    Join Date
    04-02-2007
    Posts
    40

    Thanks

    Friends,
    Thanks for the speedy help
    I am trying it and let you know.

  9. #9
    Registered User
    Join Date
    04-02-2007
    Posts
    40

    Thanks

    Hi friends,
    It is really working.

    In continuation to that, how can we calculate % (percentage).
    In other words.
    A2 = Q, i need to calculate the % 4 times
    A2 = H, i ineed to calculate the % 2 times
    A2 = Y, then i need to calcuate the % 1 time.

    How it is possible.

    Awaiting your reply friends.
    Thanks once again.

  10. #10
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi Excel999,

    As this is another question can you please post again but start a new thread and also can you attach your workbook with an explanation of exactly what you require and the expected result and I'm sure one of us will be able to help you further.

    BTW Merry Christmas

Closed 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