+ Reply to Thread
Results 1 to 7 of 7

trying to use a range of times and then input specific text

  1. #1
    Registered User
    Join Date
    02-03-2016
    Location
    Malta
    MS-Off Ver
    2010
    Posts
    4

    trying to use a range of times and then input specific text

    excel help.PNG

    Hi,

    I hope someone can help with a formula for what I am trying to do as I am pretty useless with Excel!

    I am trying to put in a specific value into the box on the end that is marked as red from the box with text underneath it.

    I want to use a range of times EG if the time is between 23:30 and 01:29 in the box that shows the time then I want it to populate the other box with specific text (2330-0129), however, I need this to cover an entire day which will give me 12 ranges:

    2330-0129
    0130-0329
    0330-0529
    0530-0729
    0730-0929
    0929-1129
    1130-1329
    1330-1529
    1530-1729
    1730-1929
    1930-2129
    2130-2329

    So to try and un-complicate, if the time in the first marked box is between any of those times then it should show the text I have pasted in the end box.

    If anyone has any idea I would be very grateful.

    Cheers

  2. #2
    Registered User
    Join Date
    02-03-2016
    Location
    Malta
    MS-Off Ver
    2010
    Posts
    4

    Re: trying to use a range of times and then input specific text

    adding a sample
    Attached Files Attached Files

  3. #3
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: trying to use a range of times and then input specific text

    This solution makes use of three helper columns. Column V has the range of times from post #1. Column W has the following formula to isolate the decimal portion of a day represented by the left hand side of the range in column V:
    Please Login or Register  to view this content.
    Column X has the following formula to isolate the decimal portion of a day represented by the right hand side of the range in column V:
    Please Login or Register  to view this content.
    Column S can then be populated by applying the following formula:
    Please Login or Register  to view this content.
    Here is a renamed copy of your file with the helper columns and formulas applied:
    Time ranges.xlsx
    Let me know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  4. #4
    Registered User
    Join Date
    02-03-2016
    Location
    Malta
    MS-Off Ver
    2010
    Posts
    4

    Re: trying to use a range of times and then input specific text

    Awesome thanks , will give it a go

  5. #5
    Registered User
    Join Date
    02-03-2016
    Location
    Malta
    MS-Off Ver
    2010
    Posts
    4

    Re: trying to use a range of times and then input specific text

    just checked it with a load more data and its working like a dream, thanks a lot, really appreciated

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: trying to use a range of times and then input specific text

    Version without helper columns;

    =INDEX($V$2:$V$14,MATCH($C2,$U$2:$U$14,1))

    Table in columns U & V

    Not exhaustively tested!
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: trying to use a range of times and then input specific text

    Quote Originally Posted by robaston1971 View Post
    just checked it with a load more data and its working like a dream, thanks a lot, really appreciated
    You're welcome and thank you for the feedback. If you haven't already please take a moment to mark the thread 'Solved' using the thread tools link above your first post. Hope that you have a nice day.

+ 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. [SOLVED] VBA to Find Specific Text, then Copy range to next open cell under specific text
    By Remotruker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2015, 10:59 AM
  2. Replies: 0
    Last Post: 12-10-2014, 11:30 AM
  3. [SOLVED] highlight when specific text appears multiple times in a range of cells - excel 2013
    By Onefynebarraza in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 10-14-2013, 09:06 AM
  4. Replies: 2
    Last Post: 08-05-2013, 07:32 PM
  5. Check specific range for any value that repeats itself 3 subsequent times
    By blackmilk in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-01-2013, 10:42 AM
  6. [SOLVED] Selecting times outside a specific range
    By jmcintyre005 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-21-2012, 12:32 PM
  7. Text to Columns - Only want to split SPECIFIC NUMBER of times
    By NewKid in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-03-2006, 10:45 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