Results 1 to 5 of 5

Count across rows of data

Threaded View

  1. #1
    Registered User
    Join Date
    12-02-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    32

    Count across rows of data

    I have a spreadsheet showing data for each state, by year (in long format), like so:

    STATE YEAR COUNT
    AL 2000 5
    AL 2001 ---
    AL 2002 4
    AK 2000 8
    AK 2001 2
    AK 2002 3
    etc.

    There is always the same 3 years of data for every State. For each State, I'd like to count across the 3 rows of data and if any value in Column C is equal to "---", then return a 0 in Column D for all 3 rows. Otherwise, return a 1.

    For example:

    STATE YEAR COUNT RESULT
    AL 2000 5 0
    AL 2001 --- 0
    AL 2002 4 0
    AK 2000 8 1
    AK 2001 2 1
    AK 2002 3 1
    etc.

    I tried using the CountIF function, but couldn't figure out how to tell Excel to apply it separately for every 3 rows of data. Any ideas? Thank you.
    Last edited by romperstomper; 07-08-2011 at 05:25 PM. Reason: Mark solved

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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