Hi Don, try this

Sub x()
    Dim Dtx As Range, dDtx As Integer, dYear As Integer
For Each Dtx In Range("D2:D" & Range("D2").CurrentRegion.Rows.Count + 1)
        If Left(Dtx, 3) = "&>0" Then
            dDtx = Mid(Dtx, 6, 3) * 1
            dYear = "20" & Mid(Dtx, 4, 2)
            Dtx.Formula = "=Date(" & dYear & ", 1, " & dDtx & ")"
            Dtx = Dtx
        End If
    Next
End Sub


Pada 09/08/2013 5:39, Don Barton menulis:
Thanks itware2008,
See my response to Sam above. I forgot to mention one little fact - this is for VBA!
Don

On Thursday, August 8, 2013 8:51:05 AM UTC-6, itware2008 wrote:

    Hello Don,

    If I understood you, this function should help you

    =DATE(YEAR(TODAY());1;0)+A2

    where A2 represents the number red by barcode scanner

    OS

    Quarta-feira, 7 de Agosto de 2013 23:41:24 UTC+1, Don Barton
    escreveu:

        Greetings,
        I work at a hospital laboratory and we have an expiration date
        barcode on blood transfusion units that formats the month and
        day as a number; the number of days since the beginning of the
        year.  We use a barcode scanner to read in the expiration
        date, but need to convert the number of days to month and day.
         For example for this year (2013), 015 Would be 1/15, 275
        would be 10/2.  The expiration date includes year and time as
        well, but I can pull out the numbers of days using the MID
        function.
        I've looked through several websites as well as this Group,
        but haven't found any solutions yet.

        Thanks,

        Don

--
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss.
---
You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.



--
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to