Technology Get the latest on technology, electronics and software…

Excel question

Thread Tools
 
Old Jul 24, 2007 | 10:47 AM
  #1  
hornyleprechaun's Avatar
Thread Starter
Bent = #1
 
Joined: Dec 2001
Posts: 13,473
Likes: 25
From: Marietta, GA
Excel question

I have a cell that contains a date formatted as 7/24/2007 we'll say cell A1

Another cell contains text and numbers at the end as BOTCM072407

I want the 2nd cell to be something like ="BOTCM" & "" & A1

The problem is when I do this it converts the date into numbers like 39286. I know where and why it converts to that number, but I don't want it to

Does anyone know how I would be able to get my result as BOTCM072407? Thanks!
Reply
Old Jul 24, 2007 | 11:38 AM
  #2  
Lightus's Avatar
I've got spurs...
 
Joined: Jan 2007
Posts: 1,499
Likes: 6
From: Gainesville, FL
if A1 is formated as text then

=BOTCM&A1 should help (it will leave your slashes in though)

There is excel function that removes specific characters from strings, exactly what the code is, I'm not entirely sure. Google knows I'm sure though...
Reply
Old Jul 24, 2007 | 11:43 AM
  #3  
wipe0ut's Avatar
visit me
 
Joined: Feb 2004
Posts: 2,804
Likes: 0
From: N ew Y ork
best i can do

A1 = BCTOM
B1 = 7/24/2007

=A1&MONTH(B1)&DAY(B1)&YEAR(B1)
Reply
Old Jul 24, 2007 | 11:46 AM
  #4  
wipe0ut's Avatar
visit me
 
Joined: Feb 2004
Posts: 2,804
Likes: 0
From: N ew Y ork
if you want leading zeros in the date you will need if()s
Reply
Old Jul 24, 2007 | 12:23 PM
  #5  
hornyleprechaun's Avatar
Thread Starter
Bent = #1
 
Joined: Dec 2001
Posts: 13,473
Likes: 25
From: Marietta, GA
Wipe0ut I turned your code into..

="BOTCM"&"0"&MONTH($E$2)&DAY($E$2)&RIGHT(YEAR($E$2 ),2)

And it works.. thanks a lot
Reply
Old Jul 24, 2007 | 12:32 PM
  #6  
wipe0ut's Avatar
visit me
 
Joined: Feb 2004
Posts: 2,804
Likes: 0
From: N ew Y ork
Originally Posted by hornyleprechaun
Wipe0ut I turned your code into..

="BOTCM"&"0"&MONTH($E$2)&DAY($E$2)&RIGHT(YEAR($E$2 ),2)

And it works.. thanks a lot
yeah "0"&MONTH($E$2) won't work for december

unless you want 012

if (month($E$2) > 9,MONTH($E$2), "0"&MONTH($E$2))

do the same thing for DAY()
Reply
Old Jul 24, 2007 | 12:48 PM
  #7  
khiyal's Avatar
Pro
 
Joined: Dec 2005
Posts: 703
Likes: 0
From: Forest Hills, NY
IF A1 contains the date and A2 contains the text, this will work:

=CONCATENATE(A2,TEXT(A1,"mmddyy"))
Reply
Old Jul 24, 2007 | 12:54 PM
  #8  
wipe0ut's Avatar
visit me
 
Joined: Feb 2004
Posts: 2,804
Likes: 0
From: N ew Y ork
Originally Posted by khiyal
IF A1 contains the date and A2 contains the text, this will work:

=CONCATENATE(A2,TEXT(A1,"mmddyy"))
Reply
Old Jul 24, 2007 | 01:32 PM
  #9  
hornyleprechaun's Avatar
Thread Starter
Bent = #1
 
Joined: Dec 2001
Posts: 13,473
Likes: 25
From: Marietta, GA
Thanks khiyal.. I have to go back and redo my sheets though! +rep to you and - rep to wipeout for failing..



J/k wipeout
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
navtool.com
3G MDX (2014-2020)
32
Jan 20, 2016 11:43 AM
navtool.com
5G TLX Audio, Bluetooth, Electronics & Navigation
31
Nov 16, 2015 08:30 PM
navtool.com
1G RDX Audio, Bluetooth, Electronics & Navigation
1
Sep 25, 2015 05:15 PM
rboller
3G TL Audio, Bluetooth, Electronics & Navigation
0
Sep 23, 2015 02:49 PM




All times are GMT -5. The time now is 04:13 AM.