+ Reply to Thread
Results 1 to 11 of 11

conditional formulas

  1. #1
    Registered User
    Join Date
    03-31-2004
    Location
    Pune ( Maharashtra) INDIA
    Posts
    16

    Angry conditional formulas

    Hi There

    I have data in two Sheets

    Can any one please help me to create this formula , I am struggling since last couple of months

    Data

    Sheet 1 column A contains unique records

    A
    b
    c
    d
    e
    f

    Sheet 2 column A contains references
    A ( Repeated 15 times)
    b( Repeated 5 times)
    Example :
    column A Column B
    B Y
    B Y
    B N
    B Y
    B Y
    c( Repeated 8 times)
    d ( repeated 71 times)
    e( Repeated times )

    and so on ......repeation of data in sheet2 is not fixed.
    ColumnB in sheet 2 contains either "Y" or "N"


    Requirement


    I want a formula that will update column C in sheet 2 with a condition

    a) Look into the Sheet1 refer 'B" check if "B" is there in sheet 2 and if column B in sheet 2 contains "N" and remaining "B" as "Y" then replace all such "Y" to "n" ( Lower case "n" only") . In case column B in Sheet 2 contains all "Y" keep the "Y" as it is

    Thanks

    Regards

    Arvind
    Last edited by arvinduj; 03-02-2007 at 05:16 AM.

  2. #2
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    better it would be if you attach here a sample file.

  3. #3
    Registered User
    Join Date
    03-31-2004
    Location
    Pune ( Maharashtra) INDIA
    Posts
    16
    Please find attachment for further details

  4. #4
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by arvinduj
    Please find attachment for further details
    I think you forgot to attach the file.

  5. #5
    Registered User
    Join Date
    03-31-2004
    Location
    Pune ( Maharashtra) INDIA
    Posts
    16

    File attached

    Hi

    Please find attached the Sample data

    I am eagerly waiting for the solution ........ please help!
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by arvinduj
    Hi

    Please find attached the Sample data

    I am eagerly waiting for the solution ........ please help!
    put formula in col C

    =IF(AND(SUMPRODUCT(($A$3:$A$500="Intangible Assets")*($B$3:$B$500="N"))=1,ISERROR(MATCH(A53,Sheet1!$A$3:$A$20,0))=FALSE,D63),"n",B53="Y")

    I have put this formula only in one cell, you can drag it down and see results.

    hope this would return what you require, please let me know.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-31-2004
    Location
    Pune ( Maharashtra) INDIA
    Posts
    16

    Thumbs up Thanks! some adjustements required if possible

    That's great! it is working fine ..

    There is small error if this can be sorted out ...... the result is coming "True" instead of "Y" when all conditions in column B are "Y"

    AND ALSO

    The original "N" is changing to "n" in small case it should be capital "N" instead rest all "n" which are replacing "Y" are correct

    Thanks in advance

    You are really great ........ so quick to resolve

    Thanks

    Regards

    Arvind

  8. #8
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by arvinduj
    That's great! it is working fine ..

    There is small error if this can be sorted out ...... the result is coming "True" instead of "Y" when all conditions in column B are "Y"

    AND ALSO

    The original "N" is changing to "n" in small case it should be capital "N" instead rest all "n" which are replacing "Y" are correct

    Thanks in advance

    You are really great ........ so quick to resolve

    Thanks

    Regards

    Arvind
    you're welcome and thank you for the feedback.

    here is the formula and this time its a bit longer than previously used.

    =IF(SUMPRODUCT(($A$3:$A$500="Intangible Assets")*($B$3:$B$500="N"))=0,B53,IF(AND(SUMPRODUCT(($A$3:$A$500="Intangible Assets")*($B$3:$B$500="N"))=1,ISERROR(MATCH(A53,Sheet1!$A$3:$A$20,0))=FALSE,B53="Y"),"n",B53))

    and see the attached file.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Hi

    more precise formula is here

    put this in cell C53 of sheet2 and drag down

    =IF(AND(SUMPRODUCT(($A$3:$A$500="Intangible Assets")*($B$3:$B$500="N"))=0,ISERROR(MATCH(A53,Sheet1!$A$3:$A$20,0))=FALSE),B53,IF(AND(SUMPRODUCT(($A$3:$A$500="Intangible Assets")*($B$3:$B$500="N"))=1,ISERROR(MATCH(A53,Sheet1!$A$3:$A$20,0))=FALSE,B53="Y"),"n",B53))

    this will return the same values (Y or N) if Intangible Assets is not found in sheet1.
    if found, it further checks that either all values in col B of sheet2 are Y against Intangible Assets if so, it will return Y in all cells, but if N is also found in col B, it will return n for Y and N for N.

    hope this would be better solution.
    Last edited by starguy; 03-02-2007 at 12:33 PM.

  10. #10
    Registered User
    Join Date
    03-31-2004
    Location
    Pune ( Maharashtra) INDIA
    Posts
    16
    Thanks a ton!

    I don't have words express my feelings .......... must say you are Master of Excel

    Regards


    Arvind

  11. #11
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by arvinduj
    Thanks a ton!

    I don't have words express my feelings .......... must say you are Master of Excel

    Regards


    Arvind
    you're welcome
    and thank you for your feelings for me.
    I'm not master as such.

    thank you.

+ 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