• 0

I need help


Question

Hi,

I have got a problem, I am working on a data base in my job and I have somthing like that : 04A2413 which is a batch number.

In fact 04 is the year A the Month (A january B febuary...) 24 the day and 13 the order.

My problem is that I would Have a function which put in a cell the according date with the batch number.

In my example the Batch number is 04A2413 and the cell has 24/01/2004 (French date).

I someone has an idea to help me ?

tha,ks in advance

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

so what exactly is the problem/question?

you dont know how to write the function to turn the batch number into a date?

or you dont know how to put it into a cell?

for the function, youd simple break the batch number up into parts to create the date, such as

BatchNumber = "04A2413"

Year = "20" & Left(BatchNumber, 2)

Year now = 2004

Month = Mid(3,BatchNumber,1)

(that might not be correct, i forget the syntax)

If Month = "A" then Month = 01, and so on

Day = Mid(4, BatchNumber,2)

Order = Mid(6,BatchNumber,2)

Text to put into cell = Day & "/" & Month & "/" & Year

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.