+ Reply to Thread
Results 1 to 5 of 5

Quote a range ...

  1. #1
    Registered User
    Join Date
    02-08-2018
    Location
    London
    MS-Off Ver
    2019
    Posts
    35

    Quote a range ...

    Hi.
    I am collating medical test results into a sheet from my online access to a hospital (their system incredibly doesn't allow a data download!) and want to quote the results in one column and the ranges in another, and then apply some conditional formatting to show which results are outside range, and also perhaps have coloured data bars to give a visual representation of the results. Is there any way to quote a range in one cell and to which one can then refer i.e. can I write 2.2-2.6 in one cell and have Excel recognise that 2.2 is the minimum, and 2.6 is the maximum, or do I have to have the minimum in one cell and the maximum in another, and if I want them to appear as '2.2-2.6', I need to use a formula, e.g. 'A2&"-"&B2'?
    TIA

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Quote a range ...

    It would be easier to have the minimum in one column and the maximum in another column (which could be hidden) and then combine them using a formula like you suggest (for visual amenity), otherwise you would need to take the characters to the left of the hyphen, and turn them into numbers (and similar for characters to the right of the hyphen), before you could compare these to your bottom and top values. You might need to use the TEXT function in your formula to ensure a consistent number of decimal places.

    Hope this helps.

    Pete

  3. #3
    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
    44,428

    Re: Quote a range ...

    I think, if you want to do mathematical comparisons on the minimum and maximum values, you would be better putting them in separate cells/columns. You could extract the values using LEFT and RIGHT functions but you would need to coerce the (text) values into numeric values using a double negative. For example, =--LEFT(A2, 3). It's doable but it can get messy if you have varying numbers of digits before and after the decimal points.
    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


  4. #4
    Registered User
    Join Date
    02-08-2018
    Location
    London
    MS-Off Ver
    2019
    Posts
    35

    Re: Quote a range ...

    Thanks both. I think I will run with the min and max values in separate cells as that'll give the simplest and cleanest results. It does also align with the general data management idea of having the smallest amount of definable data in one cell ... like title, first_name, surname etc all separate, which can then be combined if need be.
    Happy days!

  5. #5
    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
    44,428

    Re: Quote a range ...

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. How to quote a person that quote someone else?
    By testbobtt in forum Tips and Tutorials
    Replies: 8
    Last Post: 08-19-2019, 09:36 PM
  2. Code to save form as a specific name based on value in cell
    By bduncan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-17-2017, 02:33 PM
  3. Replies: 1
    Last Post: 07-14-2016, 02:23 PM
  4. [SOLVED] single quote/CID/single quote/comma
    By kl27302 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-09-2014, 10:10 AM
  5. [SOLVED] How to find and replace hidden single quote ? (This sign is single quote: ')
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-19-2014, 03:48 PM
  6. [SOLVED] problem defining quote sign " in formula property applied to range object
    By mnjofra in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-07-2012, 05:18 PM
  7. [SOLVED] We are looking for a quote log.
    By Mitch in forum Excel General
    Replies: 5
    Last Post: 04-30-2005, 01:09 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