+ Reply to Thread
Results 1 to 6 of 6

Counting random columns for values

  1. #1
    Forum Contributor
    Join Date
    09-23-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    344

    Counting random columns for values

    Morning,

    I have two problems which I can't seem to fathom. Firstly, I'm trying to:

    -count the number of times D is in the following cells Q,T,W,Z,AC,AF,AI,AL,AO,AR,AU,AX,BA,BD,BG,BJ

    I have tried all sorts of countif and countifs but it keep saying I am missing an argument.

    Secondly, using the same formula I need to count the number of D*,D,M and P. The problem is when I try to use D* it counts the Ds as well.

    Many thanks for any help you can give.

    Regards
    Last edited by Cmorgan; 08-13-2013 at 03:45 AM.

  2. #2
    Forum Guru XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,226

    Re: Counting random columns for values

    Hi,

    I assume you mean cells:

    Q1, T1, W1, Z1, AC1, AF1, AI1, AL1, AO1, AR1, AU1, AX1, BA1, BD1, BG1, BJ1

    or some other row number?

    COUNTIF and other functions are not so good with non-contiguous range references (i.e. various disconnected cells/ranges). Would there be any harm in taking the whole range, i.e. Q1:BJ1 and counting the number of Ds within that?

    That way, your formula would be:

    =COUNTIF(Q1:BJ1,"D")

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Contributor
    Join Date
    09-23-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    344

    Re: Counting random columns for values

    Thanks, the problem is they can't be consecutive columns due to another programme I need to import into later on.

  4. #4
    Forum Guru XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,226

    Re: Counting random columns for values

    No, I know that the columns can't be consecutive, but is there any reason that the function counting these cells cannot count the cells from columns in between those that you wish to count?

    Or are there Ds in these unwanted, in-between columns which would potentially affect that count?

    Regards

  5. #5
    Forum Contributor
    Join Date
    09-23-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    344

    Re: Counting random columns for values

    Yes, unfortunately the inbetween cells also have the same value sets. In this case one column is AS results, and thenext column is A2 exam results, both have the same grades.

  6. #6
    Forum Contributor
    Join Date
    09-23-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    344

    Re: Counting random columns for values

    Sorted via doing an additional lookup sheet

+ 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. Pick random values from different columns
    By shredie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-30-2013, 11:02 AM
  2. Counting specific values from maximum values of specified columns
    By Arkotan in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 05-06-2013, 05:16 AM
  3. Counting values in 2 columns
    By kethyar in forum Excel General
    Replies: 13
    Last Post: 03-26-2008, 04:52 PM
  4. Counting values in different columns
    By gary965 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-28-2007, 01:26 PM
  5. [SOLVED] Counting Rows Then Counting Values in Columns
    By Michael via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2005, 12:05 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.6.0 RC 1