+ Reply to Thread
Results 1 to 7 of 7

Thread: Formula looking in 2 columns

  1. #1
    Registered User
    Join Date
    08-26-2008
    Location
    Oklahoma
    Posts
    24

    Formula looking in 2 columns

    I need a formula to look in column B and find all "jun" THEN look in column J and find only all "d's" that correspond to the "jun" then give me the count of the "d's".

    This is an example. With the formula I can do a variety of things to get info that I'd like to have.

    Thanks,
    George4

  2. #2
    Registered User
    Join Date
    07-25-2007
    Location
    Singapore
    Posts
    11

    Use helper column

    Hi George,

    I still pretty new to this and I hope I can do my part to help as well. This is a great forum for me to get help from.

    I suggest using a helper column to create a unique ID for you to do a countif function.

    Here's a sample for you. See the attached file.

    HTH,
    J
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    08-26-2008
    Location
    singapore
    Posts
    618
    You can do this by using only one array formula:

    =SUM((A1:A10="d's")*(B1:B10="jun"))

    But remember press Ctrl+Shift+Enter after typing it, instead of just Enter.

  4. #4
    Registered User
    Join Date
    08-26-2008
    Location
    Oklahoma
    Posts
    24
    jtan:

    It looks like by making a helper column you're actually going back and putting the answer (helper column criteria) next to the ones that you want it to count. That kind of takes the "automatic" out of a computer formula.

    Let me know if I've missed something.

    sglife:
    I tried your formula where I should have had 2 "d" corresponding with 2 "jun". The third "jun" I put an "x". The answer I got was "0" instead of "2".

    Any thoughts?

  5. #5
    Valued Forum Contributor
    Join Date
    08-26-2008
    Location
    singapore
    Posts
    618
    george4

    I think its because you have changed the formula cell after or before you keyin the "x", remember everytime after you changed or just click inside the formula cell, press a "Ctrl+Shift+Enter".

  6. #6
    Registered User
    Join Date
    08-26-2008
    Location
    Oklahoma
    Posts
    24
    sglife:
    OK. I switched the 2 parts of the formula and it worked...BUT...again, if I have to press ctrl+shift+enter every time...it doesn't make it automatic.

    The answer to the formula is actually used in a formula on another excel page. (Not sure I'm explaining this right) So it has to (1) look for and (2) match up the correct criteria, then (3) post the count for the answer. The answer, in turn, is then "picked up" by another excel page and used in a formula there where I use it to find a percentage.

    Thanks for all your help.
    I think we're getting close.

  7. #7
    Registered User
    Join Date
    08-26-2008
    Location
    Oklahoma
    Posts
    24
    Thanks for your help. I got the answer to the problem here: http://www.excelforum.com/excel-misc...ive-count.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. hiding / showing columns...
    By LSB M in forum Excel Programming
    Replies: 15
    Last Post: 07-07-2008, 05:50 PM
  2. Reset Formula without Editing Formula?
    By Ogey in forum Excel Worksheet Functions
    Replies: 1
    Last Post: 09-27-2007, 08:44 PM
  3. Please help - formula to compare columns
    By ejsp in forum Excel - New Users
    Replies: 3
    Last Post: 12-01-2006, 04:43 AM
  4. Insert Row Formula Strangeness
    By Cavar in forum Excel General
    Replies: 9
    Last Post: 10-28-2006, 10:11 PM
  5. formula for adding 4 adjacent columns & dividing result by 1.833
    By FredricJLowe in forum Excel Worksheet Functions
    Replies: 3
    Last Post: 10-09-2006, 07:59 PM

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.2.0