+ Reply to Thread
Results 1 to 10 of 10

Maybe a tricky one. Using A date and numerical range in the same cell.

Hybrid View

  1. #1
    Registered User
    Join Date
    11-05-2015
    Location
    UK
    MS-Off Ver
    2016 for Mac & PC
    Posts
    5

    Maybe a tricky one. Using A date and numerical range in the same cell.

    Hi All,
    I hope you can help.

    I have a form I'm trying to build.
    I'll explain my numbering first before I get to the point, if I may?
    The number I'm working on in the cell looks like this: 1701/001-010
    The 1701 is my reference to it being the year 2017 and 01 is January. This will obviously change on a monthly and yearly basis.
    Next comes my range of product 001-010. This is also likely to change on a daily basis. (The next one would be 1701/011-014 for example).

    Let's say that that identifier (1701/001-010) is in Cell E11.
    What I would then like to happen is that Cell A20 would show: 1701/01. A21 would show 1701/02, A22 , 1701/03 and so on.

    The next part of the question would be: Because the ranges my differ between one and 25, I only want the number of cells to auto fill with the data that the range covers.
    ie. if the range was 1701/001-003
    Then I only want 3 cells to be filled. A20 would be 1701/001, A21 1701/002 & A22 1701/003. A23 be blank.
    However if the range was 17001-004 then A23 would be filled and so on.
    Is what I'm trying to do possible or is the '/' stopping me?

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486

    Re: Maybe a tricky one. Using A date and numerical range in the same cell.

    You can do lots of manipulating with =Concatenate()

    For example:
    Using today as the date or having the date in A2
    =CONCATENATE(TEXT(TODAY(),"yy"),TEXT(TODAY(),"mm"),"/",TEXT(TEXT(TODAY(),"dd"),"000"))
    =CONCATENATE(TEXT(A2,"yy"),TEXT(A2,"mm"),"/",TEXT(TEXT(A2,"dd"),"000"))
    The other parts of the question may be better answered if you supplied a sample.

  3. #3
    Registered User
    Join Date
    11-05-2015
    Location
    UK
    MS-Off Ver
    2016 for Mac & PC
    Posts
    5

    Re: Maybe a tricky one. Using A date and numerical range in the same cell.

    The other parts of the question may be better answered if you supplied a sample.[/QUOTE]

    How do I attach a file to my post?
    I don't see any tool buttons that allow me to do that?

    Additionally, I'm not needing to have the cell formatted as a date.
    The Number in Cell E11 in my Example would be what I type in. No formula required there.

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486

    Re: Maybe a tricky one. Using A date and numerical range in the same cell.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Registered User
    Join Date
    11-05-2015
    Location
    UK
    MS-Off Ver
    2016 for Mac & PC
    Posts
    5

    Re: Maybe a tricky one. Using A date and numerical range in the same cell.

    Thanks.
    File Attached
    Attached Files Attached Files

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

    Re: Maybe a tricky one. Using A date and numerical range in the same cell.

    This proposed solution uses a couple of helper cells which may be hidden or moved for aesthetic purposes although they are not part of the form so that may not matter. The first helper cell will get the value of the first number in the range of product using the formula:
    Formula: copy to clipboard
    =VALUE(MID(E11,SEARCH("/",E11)+1,3))
    The second helper cell will get the value of the last number in the range of product using the formula:
    Formula: copy to clipboard
    =VALUE(MID(E11,SEARCH("-",E11)+1,3))
    The range A29:A52 is then populated by the formula:
    Formula: copy to clipboard
    =IF(G$11+1*(ROW(A1)-1)<=H$11,LEFT(E$11,5)&TEXT(G$11+1*(ROW(A1)-1),"000"),"")
    Let us 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.

  7. #7
    Registered User
    Join Date
    11-05-2015
    Location
    UK
    MS-Off Ver
    2016 for Mac & PC
    Posts
    5

    Re: Maybe a tricky one. Using A date and numerical range in the same cell.

    Thank you JeteMc.
    Much Appreciated.
    Baz

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

    Re: Maybe a tricky one. Using A date and numerical range in the same cell.

    Here is another variation of the formula that could be pasted into A29 and copied down without using any 'helpers':
    Formula: copy to clipboard
    =IF(VALUE(MID(E$11,SEARCH("/",E$11)+1,3))+1*(ROW(A1)-1)<=VALUE(MID(E$11,SEARCH("-",E$11)+1,3)),LEFT(E$11,5)&TEXT(VALUE(MID(E$11,SEARCH("/",E$11)+1,3))+1*(ROW(A1)-1),"000"),"")
    Let us know if you have any questions.

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

    Re: Maybe a tricky one. Using A date and numerical range in the same cell.

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you found your first visit to Excel Forum beneficial and that you have a blessed day.

  10. #10
    Registered User
    Join Date
    11-05-2015
    Location
    UK
    MS-Off Ver
    2016 for Mac & PC
    Posts
    5

    Re: Maybe a tricky one. Using A date and numerical range in the same cell.

    Done.
    Thanks Again.

+ 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. Extraction of numerical digits from a mixed alpha numerical Excel cell.
    By JustWilliam in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-05-2016, 01:44 PM
  2. [SOLVED] tricky formula required depending on numerical data per headers
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-04-2016, 10:10 AM
  3. Need help with a tricky Date formula
    By toonisking in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-30-2013, 11:53 AM
  4. Replies: 0
    Last Post: 06-26-2013, 08:46 PM
  5. [SOLVED] Tricky Date Format
    By jomili in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-31-2012, 01:49 PM
  6. Replies: 6
    Last Post: 08-10-2006, 11:30 PM
  7. [SOLVED] Tricky Date Calculation
    By dan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2006, 10:20 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