+ Reply to Thread
Results 1 to 2 of 2

Display random title from Reading list for books I haven't read.

  1. #1
    Registered User
    Join Date
    04-10-2019
    Location
    VA
    MS-Off Ver
    Excel 2010
    Posts
    15

    Display random title from Reading list for books I haven't read.

    I have a reading list set up, title, number in series, Author, format, genre, when it was finished.

    What I'm trying to do is have a title display randomly for books that have not been read, and that are the first in their series which will have a 1 in the # column. (They'll have a 1 in the # column, even if they are stand alones). For those times when I want to read but I'm not in the mood to sort through my list and pick one. This will do it for me.

    This is the code i'm using currently =IF(AND(B2=1,ISBLANK(F2)),A2,IF(AND(B2>1,ISBLANK(F2)),"not yet", "You've read it")) to sort out the titles

    This is what I'm using to generate the title which is drawing from Column H where the books are sorted =IF(OR(H:H="you've read it",H:H="not yet"), INDEX($H:$H,RANDBETWEEN(1,COUNTA($H:$H)),1),"")

    I'm probably over complacating this.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... based in Ireland
    MS-Off Ver
    µSoft Office 365. Learning Excel all over again!!
    Posts
    30,754

    Re: Display random title from Reading list for books I haven't read.

    Hi. Try this array formula:

    =INDEX(A:A,AGGREGATE(15,6,ROW(Table4[Title])/(($H$2:$H$29<>"You've read it")*($H$2:$H$29<>"not yet")),RANDBETWEEN(1,COUNTIFS(H:H,"<>"&{"You've read it","not yet"},H:H,"<>"))))

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...

    as you're probably aware, the RANDBETWEEN formula is volatile. it will recalculate everytime ANYTHING changes on your sheet. if that's OK. Fine & dandy. If not, you'll need VBA (.xlsm). Let me know.
    Attached Files Attached Files
    Glenn



+ 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. Replies: 8
    Last Post: 02-07-2019, 05:56 AM
  2. Reading random binary file with header
    By Moadll in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-23-2016, 10:46 AM
  3. [SOLVED] List box to read input range rather than random digit
    By kosherboy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-02-2014, 11:19 AM
  4. [SOLVED] Formu;a Reading Zero Possible to read blank
    By chriswiec in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-27-2013, 08:10 AM
  5. Replies: 3
    Last Post: 03-13-2012, 12:46 PM
  6. Null read in some cases when reading from xls using ODBC
    By krash in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-26-2007, 02:24 PM
  7. Reading Text Files Into Excel (.Read) and Searching Them
    By Mortonic in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-18-2007, 06:06 AM

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