Hello fellow excel users,
I had a quick question. What does this formula mean?
=IF(ISTEXT(A2),REPLACE(MID(A2,4,3)&A2,7,3,"")+0,DATE(YEAR(A2),DAY(A2),MONTH(A2)))
I get the gist but can someone break it down for me please?
Appreciate the help!
Hello fellow excel users,
I had a quick question. What does this formula mean?
=IF(ISTEXT(A2),REPLACE(MID(A2,4,3)&A2,7,3,"")+0,DATE(YEAR(A2),DAY(A2),MONTH(A2)))
I get the gist but can someone break it down for me please?
Appreciate the help!
On a quick glance, it would seem that you have cells where data is input in 2 different ways:
1) Excel recognizes the cell content as a date; which means that it's a serial number, causing the =ISTEXT() part to return FALSE, and thus enabling you to use the =DATE() formula. (Which might actually be redundant; try to replace DATE(YEAR(A2),DAY(A2),MONTH(A2)) with A2)
2) Excel does not recognize cell contents as date, causing it to be treated as text; and thus the =ISTEXT() returns true. The =REPLACE() part then manipulates cell contents in some way.
Sincerely
S?ren Larsen
"Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"
Thank you Larsen.
I get that bit. It is just the individual parts. This code converts American dates to European dates and I don't quite get why and how.
Perhaps you can provide an example?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks