Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Copy one cell and merge into another

Hi,

Is a macro for this possible?

1. Active cell (is a number)
2. 4 cells to the right from active cell (is text)
3. Add the value from the first cell (1) at the end of the text without any
space


Example

Before macro:
First active cell = any number e.g. 458
Four cells to the right = Test/

After macro:
First active cell = 458
Four cells to the right = Test/458 (if possible change 458 to blue colour.

Kaj Pedersen
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Copy one cell and merge into another

Try...

Sub JoinCells_ColorNums()
Dim iPos%
With ActiveCell.Offset(0, 4)
iPos = Len(.value) + 1
.value = .value & ActiveCell.value
.Characters(iPos).Font.Color = vbBlue
End With
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Copy one cell and merge into another

Hi,

Your suggested code did exactly what I wanted. I appreciate it very much.
Thank you.

Best regards,
Kaj Pedersen
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Copy one cell and merge into another

Hi,

Your suggested code did exactly what I wanted. I appreciate it very much.
Thank you.

Best regards,
Kaj Pedersen


You're welcome...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
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
merge/copy but needs to compare Joanna Excel Discussion (Misc queries) 0 March 19th 08 08:56 PM
Cannot copy the merge cells pai_kanwar via OfficeKB.com Excel Worksheet Functions 4 February 15th 08 04:12 PM
Merge across - copy and paste Carole O Excel Discussion (Misc queries) 3 October 26th 05 09:15 PM
Copy from merge cell MK Excel Discussion (Misc queries) 4 June 26th 05 11:30 AM
Merge cell & Copy Data from different cell MK Excel Discussion (Misc queries) 0 June 24th 05 10:54 AM


All times are GMT +1. The time now is 04:56 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"