+ Reply to Thread
Results 1 to 3 of 3

Question regarding column number

  1. #1
    Registered User
    Join Date
    01-02-2009
    Location
    Massachusetts, US
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question regarding column number

    I have a similar question, is there a way to get the column numbers for the first and last non-blank values in a row? In my spreadsheet, each column represents a week of time billed to a client, so with a start week and end week I can get a length of relationship.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

    I moved it to its own thread for you this time
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    12-30-2008
    Location
    Vermont, USA
    MS-Off Ver
    Excel 2003
    Posts
    64
    If there are no blank columns in the middle of your data, you could do something like this:

    =COUNTA(B2:IV2)

    this will give you a total number of columns between Column B and Column IV on row 2 that are not blank. Modify as needed....

    If you only have text (i.e., non-numerical data) in the columns, you could also do this:

    =COUNTIF(B2:IV2,"?*")

    which will allow you to count with a little more discretion. A question mark is a wildcard for any character formatted as text, and an asterick is a wildcard for anything (including nothing). Post back for more detail. Basically, "?*" will search for anything at least one character long, "????*" will search for any at least 4 characters long, "*hours billed*" will search for anything that contains the text "hours billed" (such as "22 hours billed & paid"), etc.

    For some reason, the MATCH function doesn't work with wildcards; otherwise you could do something a little more elegant.
    Last edited by clownfish; 01-02-2009 at 05:29 PM.

+ 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