Results 1 to 2 of 2
  1. #1
    Join Date
    May 2014
    Posts
    10

    Unanswered: check if cell has value in another column

    Hello,

    I have table as below and I need to get column C. In A there is name of the firm, in Column B is a date. I need to know if for the firm A there is value in Column B, not just in appropriate row but in whole column.
    Code:
    Column A Column B               Column C
    A            x                          Yes
    A            x                          YEs
    A                                        Yes
    B            x                          Yes
    B                                        Yes 
    C            x                          Yes
    D                                       No
    D                                       No
    A                                       Yes
    I am trying to combine some ifs, but no success.
    Thank you in advance!
    Martin
    Last edited by gvee; 12-08-14 at 06:57. Reason: [code] tags for formatting

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Code:
    =COUNTIFS(A:A, A1,B:B, "x")
    This will give you a count of the number of "x" in column B, for the matching value in Column A.

    Because ColB is a date, we need to tweak this slightly..
    Code:
    =COUNTIFS(A:A, A1,B:B, "<>")
    The "<>" is shorthand for "not blank"

    Finally, to get your Yes/No result we basically check to see if our count is greater than zero or not!
    Code:
    =IF(COUNTIFS(A:A, A7,B:B, "<>") = 0, "No", "Yes")
    George
    Home | Blog

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •