ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   dates and number (https://www.excelbanter.com/excel-discussion-misc-queries/201554-dates-number.html)

EngelseBoer

dates and number
 
hi again

is it possible to look-up part numbers ? and compare dates

i.e. in the below..
can the year "2003" be compared to the 1st 4 ditgets of the Reg number
and return False if not

Reg. No. D.O.B
2003101871005 22/12/2003


regards
Malcolm

Dave Peterson

dates and number
 
I'm not sure what you mean by lookup, but you could compare the first 4
characters of A1 with the year of the date in B1 with:

=if(left(a1,4)=text(b1,"yyyy"),"same","different")



EngelseBoer wrote:

hi again

is it possible to look-up part numbers ? and compare dates

i.e. in the below..
can the year "2003" be compared to the 1st 4 ditgets of the Reg number
and return False if not

Reg. No. D.O.B
2003101871005 22/12/2003

regards
Malcolm


--

Dave Peterson

EngelseBoer

dates and number
 
PERFECT
exactly what i need
thanks Dave

"Dave Peterson" wrote:

I'm not sure what you mean by lookup, but you could compare the first 4
characters of A1 with the year of the date in B1 with:

=if(left(a1,4)=text(b1,"yyyy"),"same","different")



EngelseBoer wrote:

hi again

is it possible to look-up part numbers ? and compare dates

i.e. in the below..
can the year "2003" be compared to the 1st 4 ditgets of the Reg number
and return False if not

Reg. No. D.O.B
2003101871005 22/12/2003

regards
Malcolm


--

Dave Peterson



All times are GMT +1. The time now is 04:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com