+ Reply to Thread
Results 1 to 4 of 4

turn cells at the end

  1. #1
    Forum Contributor
    Join Date
    09-09-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    102

    turn cells at the end

    replace 9 with 8 start - Copy.xlsm

    I attach my workbook here.

    I need to distinguish between not reached and omitted i.e. if a candidate answers questions 1,2,4 and 5 out of 15, I want to code question 3 (the blank cell) as Z (omitted) but code questions 6-15 as Y (not reached). The code below works for doing this when omit is 9 and not reached as 8, but when I change 9 to Z and 8 to Y it falls over. Any ideas why or how to get it to work? Thanks.

    Please Login or Register  to view this content.
    Thank you

    Z

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,527

    Re: turn cells at the end

    You can use this formula to locate the last column in the range:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And this to count how many are non blank:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    That should allow you to determine if all the questions were attempted, if the test was not completed and if there were omissions.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    09-09-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    102

    Re: turn cells at the end

    Thanks TMS. I would like to count the Z's in VBA though to populate with a message box. Is this possible?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,527

    Re: turn cells at the end

    Ok, this isn't simple, so you need to make a decision.

    There are, effectively, four states:
    Not started
    Started, not finished, gaps
    Started, finished, gaps
    Started, finished, no gaps

    I can give you three separate formulae which will indicate the states, however, combining them would make for a very complex and unmanageable formula. And, if it were repeated many times, it might have an adverse effect on performance.

    My recommendation would be to have three separate columns and filter on them as required:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The last formula actually highlights gaps at the end so, in itself, it isn't necessarily a true reputation, as a gap of one or more cells at the end would imply "not finished". So, you can see where I'm going with this.

    Happy to provide code to put those three formulae into code if you're happy with that as a compromise.

    Regards, TMS

+ 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. Turn off calculations before query refresh....turn them back on after
    By mk3ll00 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2014, 03:25 PM
  2. sum and divide cells and have cells to turn to zero if #div/o! exist
    By big0 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 04-07-2014, 01:28 PM
  3. Cells on linking turn 0
    By chriswinslow1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-11-2013, 03:37 PM
  4. Turn zero-valued cells into blank cells while preserving link
    By ockidocki in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2013, 08:21 AM
  5. How to turn certain cells green
    By sharkman1912 in forum Excel General
    Replies: 4
    Last Post: 07-13-2012, 06:12 PM
  6. Auto calc on, then turn off, then runtime error how to turn back on
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-22-2011, 10:37 AM
  7. Replies: 1
    Last Post: 07-30-2010, 03:35 PM

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