View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
STEVE BELL STEVE BELL is offline
external usenet poster
 
Posts: 692
Default Copy Contents of 3 Columns into 1

This works in Excel 2000.
The Trim() removes leading and trailing spaces
If you are working with values than remove Trim

[You can use Cells(), Cells().Value, Cells().Text]
===========================
Dim rw as Long, x as Long

rw = Cells(Rows.COUNT, "C").End(xlUp)

For x = 1 to rw
Cells(x, 4) = Trim(Cells(x, 4)) & Trim(Cells(x, 5)) & Trim(Cells(x, 6))
Next
==============================
--
steveB

Remove "AYN" from email to respond
"Lynxen" wrote in
message ...

Hello
I've got a "small" problem that has become HUGE
I have data in 3 columns for example D E F, what i wan't to do is to
move the contents of D E F into D and remove any spaces in between and
do so for 10k rows or more. No problem to do manually for a few but
quite hefty for 10k data posts. Someone help me writing a macro,
because i'm stuck.


--
Lynxen
------------------------------------------------------------------------
Lynxen's Profile:
http://www.excelforum.com/member.php...o&userid=25164
View this thread: http://www.excelforum.com/showthread...hreadid=386612