+ Reply to Thread
Results 1 to 5 of 5

Formula confusion

  1. #1
    Registered User
    Join Date
    06-13-2005
    Posts
    43

    Formula confusion

    I have2 columns "G" & "H"

    I need to do a calculation counting the amount of rows that the figure in g is the same in h for each row.

    I hope this is enough information.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,483
    try out sumproduct, do a search on that

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

    Lightbulb

    Quote Originally Posted by XCESIV
    I have2 columns "G" & "H"

    I need to do a calculation counting the amount of rows that the figure in g is the same in h for each row.

    I hope this is enough information.
    put following function in cell I1

    =AND(ISERROR(MATCH(H1,G:G,0)),ISERROR(MATCH(G1,H:H,0))) and copy it downwards to the extent you have data in col G & H (upto maximum rows). it will return FALSE if value is in both cells and TRUE if value is not in both cells.

    at the end of this column (col I) put following function to count FALSE appeating in col I

    =COUNTIF(I1:I100,"False") it will give you number of values which are in both columns.

    hopfully this would help you
    Regards

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

    Lightbulb

    if you only want to count the figures in col G which are in col H as well then use this function.

    =ISERROR(MATCH(G1,H:H ,0))

    and use COUNTIF function at the end in the same way as mentioned in my previous post.

  5. #5
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    If you just want to match in the specific row
    either

    =SUM(IF(G5:G10=H5:H10,1,0)) entered as an array shft ctrl enter
    or =SUMPRODUCT((G5:G10=H5:H10)*1)

    Regards

    Dav

+ 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