Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ll ll is offline
external usenet poster
 
Posts: 67
Default concatenate values of two cells

How do you go about setting the value of one cell equal to a text
string of the value of one cell, &, and the value of another cell?
Specifically, I'm trying to refer to the date values of my begin and
end dates on my timesheet.

Thanks,
Louis

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default concatenate values of two cells

with activesheet
.range("a1").value = format(.range("b1"),"mm/dd/yyyy") _
& " to " _
& format(.range("b2"), "mm/dd/yyyy")
end with

But you could do the same thing with a formula in the cell:

=text(b1,"mm/dd/yyyy") & " to " & text(b2,"mm/dd/yyyy")



ll wrote:

How do you go about setting the value of one cell equal to a text
string of the value of one cell, &, and the value of another cell?
Specifically, I'm trying to refer to the date values of my begin and
end dates on my timesheet.

Thanks,
Louis


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default concatenate values of two cells

It sounds like you want Concatenate the start and end date in one cell, as
text, when the start and end dates are dates, not text.

=CONCATENATE(TEXT(E1,"m/d/yyyy")," - ",TEXT(F1,"m/d/yyyy"))
where E1 is start date and F1 is end date.

Mike F
"ll" wrote in message
oups.com...
How do you go about setting the value of one cell equal to a text
string of the value of one cell, &, and the value of another cell?
Specifically, I'm trying to refer to the date values of my begin and
end dates on my timesheet.

Thanks,
Louis



  #4   Report Post  
Posted to microsoft.public.excel.programming
ll ll is offline
external usenet poster
 
Posts: 67
Default concatenate values of two cells

On May 14, 5:16 pm, "Mike Fogleman"
wrote:
It sounds like you want Concatenate the start and end date in one cell, as
text, when the start and end dates are dates, not text.

=CONCATENATE(TEXT(E1,"m/d/yyyy")," - ",TEXT(F1,"m/d/yyyy"))
where E1 is start date and F1 is end date.

Mike F"ll" wrote in message

oups.com...

How do you go about setting the value of one cell equal to a text
string of the value of one cell, &, and the value of another cell?
Specifically, I'm trying to refer to the date values of my begin and
end dates on my timesheet.


Thanks,
Louis


Thanks Dave and Mike,
Yes, I am wanting to list start and end dates, separated by a dash,
etc. The cells to which this will refer get their values from yet
another worksheet. I tried the "with active sheet..." code, but I got
the reference to the cells, rather than the actual values. Could this
be a formatting problem?

Thanks again,
Louis

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default concatenate values of two cells

No I wouldn't think so. Dave's code uses the value in the cell. A date is
really a serial number that Excel formats to a particular date type display,
which Dave also specified. There must be some other underlying reason.

Mike F
"ll" wrote in message
ps.com...
On May 14, 5:16 pm, "Mike Fogleman"
wrote:
It sounds like you want Concatenate the start and end date in one cell,
as
text, when the start and end dates are dates, not text.

=CONCATENATE(TEXT(E1,"m/d/yyyy")," - ",TEXT(F1,"m/d/yyyy"))
where E1 is start date and F1 is end date.

Mike F"ll" wrote in message

oups.com...

How do you go about setting the value of one cell equal to a text
string of the value of one cell, &, and the value of another cell?
Specifically, I'm trying to refer to the date values of my begin and
end dates on my timesheet.


Thanks,
Louis


Thanks Dave and Mike,
Yes, I am wanting to list start and end dates, separated by a dash,
etc. The cells to which this will refer get their values from yet
another worksheet. I tried the "with active sheet..." code, but I got
the reference to the cells, rather than the actual values. Could this
be a formatting problem?

Thanks again,
Louis



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
concatenate values Flint springs Excel Worksheet Functions 4 May 23rd 09 08:41 PM
Concatenate Values with VBA jlclyde Excel Discussion (Misc queries) 2 October 1st 08 07:05 PM
Totaling cells consisting of values determined through concatenate [email protected] Excel Worksheet Functions 3 April 9th 07 08:59 PM
Concatenate values dan Excel Worksheet Functions 2 August 14th 06 11:03 PM
Concatenate values Dan Excel Programming 2 August 14th 06 10:59 PM


All times are GMT +1. The time now is 03:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"