+ Reply to Thread
Results 1 to 3 of 3

Conditional formatting on a searchable database

  1. #1
    Registered User
    Join Date
    10-04-2018
    Location
    Glasgow
    MS-Off Ver
    2007
    Posts
    2

    Conditional formatting on a searchable database

    Hi all,

    Apologies if this is posted in the wrong location.

    I have created a searchable database using a macro, I think. I used an online tutorial which I cannot post the link to.

    The idea is that patients get blood tests every so often and I created a database that allows the user to search on the patient's unique identifier to show cumulative results. If you type the patient's ID into the search field and select ID from the filed list it will tabulate and graph results for 2 tests.

    However, I would also like to highlight in red any result which has increased or decreased by 15% from the previous result for that patient (i.e. after the filter is applied). Presently I can only get it to format on the result above on the unfiltered table, so most likely results from a different patient.

    I have attached an example sheet that contains made-up information but demonstrates the principle.

    Any help would be appreciated.

    Apologies if this is not clear or I have posted into the wrong forum.


    Thanks
    Streebek
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Conditional formatting on a searchable database

    Here is my take on it. I'm not using VBA. I am using a pivot table and some named dynamic ranges. I am also using slicers to do the selecting. To figure out slicers, select the pivot table and then on the Insert ribbon, select Slicers. The rest is very intuitive.

    The last two columns in the pivot table are defined as: % difference from previous. Since the pivot table does all the selection and sorting it will compute based on the group of people and the dates are sorted in order.

    I also have some helper columns. The only part of these columns used are determined by the dynamic ranges. I plot the "black" series first and then plot the "red" series over it.

    Here are the two wikis to do the chart plotting:
    http://www.utteraccess.com/wiki/Offs...Dynamic_Ranges
    http://www.utteraccess.com/wiki/Dynamic_Charting
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    10-04-2018
    Location
    Glasgow
    MS-Off Ver
    2007
    Posts
    2

    Re: Conditional formatting on a searchable database

    Hey,

    Thanks so much for the response and apologies for the delay in acknowledging it (thought I would get an email notification).

    I will give this a try and see how I get on.


    Thanks again.

    Take care

+ 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. Creating a searchable web database
    By ki4got in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-17-2017, 09:05 AM
  2. Searchable excel Database
    By bambi1886 in forum Excel General
    Replies: 1
    Last Post: 06-22-2016, 11:30 AM
  3. Searchable Troubleshooting Database
    By redacer in forum Excel General
    Replies: 0
    Last Post: 04-29-2015, 10:12 PM
  4. Replies: 0
    Last Post: 09-15-2014, 08:59 PM
  5. Creating a searchable database
    By Khanzaki in forum Excel Programming / VBA / Macros
    Replies: 33
    Last Post: 08-16-2013, 11:38 AM
  6. Replies: 1
    Last Post: 01-02-2013, 12:40 PM
  7. Searchable Excel Workbook Database
    By oneblueaugust in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-14-2009, 11:56 AM

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