#1   Report Post  
Posted to microsoft.public.excel.misc
Robert57
 
Posts: n/a
Default Join text


Ok. I will try to explain.
I want to join text from several cells and I'm using a function
"Sammafoga(A1;a2;a3)"
But I want the text to be formatted in the recevied cell, i.e. font
size from A1 shall be 18, a2 italic and a3 normal.

How do I do that?

tnx for your answer
Robert


--
Robert57
------------------------------------------------------------------------
Robert57's Profile: http://www.excelforum.com/member.php...o&userid=29838
View this thread: http://www.excelforum.com/showthread...hreadid=495454

  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Join text

First copy the result of the formula and paste/special as value to an un-used
cell. Then, in the formula bar, select the regions of text and format them
individually
--
Gary's Student


"Robert57" wrote:


Ok. I will try to explain.
I want to join text from several cells and I'm using a function
"Sammafoga(A1;a2;a3)"
But I want the text to be formatted in the recevied cell, i.e. font
size from A1 shall be 18, a2 italic and a3 normal.

How do I do that?

tnx for your answer
Robert


--
Robert57
------------------------------------------------------------------------
Robert57's Profile: http://www.excelforum.com/member.php...o&userid=29838
View this thread: http://www.excelforum.com/showthread...hreadid=495454


  #3   Report Post  
Posted to microsoft.public.excel.misc
Thiem
 
Posts: n/a
Default Join text


Function is concatenate, however you will need vba to change the result
in the multi format you specify. Will have a look and if I have
success, i will let you know. Alleast other users will know what
function yo refer to.


--
Thiem
------------------------------------------------------------------------
Thiem's Profile: http://www.excelforum.com/member.php...o&userid=27474
View this thread: http://www.excelforum.com/showthread...hreadid=495454

  #4   Report Post  
Posted to microsoft.public.excel.misc
Robert57
 
Posts: n/a
Default Join text


Tnx, but I have 365 cells to manually convert. But maybe I can send the
file to you? ;)

That is right I'm trying to make a calender.

regrds
Robert


--
Robert57
------------------------------------------------------------------------
Robert57's Profile: http://www.excelforum.com/member.php...o&userid=29838
View this thread: http://www.excelforum.com/showthread...hreadid=495454

  #5   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Join text

Robert,

Here is some VBA. Select the cells to concatenate, then run it

Sub Sammanfoga()
Dim cell As Range
Dim stemp
For Each cell In Selection
stemp = stemp & Format(cell.Value, cell.NumberFormat)
Next cell
Set cell = Application.InputBox("select cell with mouse for concatenated
values", _
Type:=8)
cell.Value = stemp
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Robert57" wrote in
message ...

Tnx, but I have 365 cells to manually convert. But maybe I can send the
file to you? ;)

That is right I'm trying to make a calender.

regrds
Robert


--
Robert57
------------------------------------------------------------------------
Robert57's Profile:

http://www.excelforum.com/member.php...o&userid=29838
View this thread: http://www.excelforum.com/showthread...hreadid=495454





  #6   Report Post  
Posted to microsoft.public.excel.misc
Thiem
 
Posts: n/a
Default Join text


Sub Macro6()
'
'
'
Range("I1352").Select
ActiveWindow.LargeScroll Down:=-12
ActiveWindow.ScrollRow = 1
Range("D2").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-3],RC[-2],RC[-1])"
Range("E2").Select
ActiveCell.FormulaR1C1 = ""
Range("D2").Select
Selection.Copy
Range("E2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Range("E2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = ""
Range("F2").Select
ActiveCell.FormulaR1C1 = "=LEN(RC[-5])"
Range("G2").Select
ActiveCell.FormulaR1C1 = "=LEN(RC[-5])"
Range("H2").Select
ActiveCell.FormulaR1C1 = "=LEN(RC[-5])"
Range("A2").Select
End Sub
Sub Macro7()
'
'

'
Range("E2").Select
ActiveCell.FormulaR1C1 = "bbbbbaaaaarrrrr"
With ActiveCell.Characters(Start:=1, Length:=5).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 16
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With ActiveCell.Characters(Start:=1 + 5, Length:=5).Font
.Name = "Arial"
.FontStyle = "Italic"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With ActiveCell.Characters(Start:=1 + 5 + 5, Length:=5).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("G4:G5").Select
Range("G5").Activate
End Sub


--
Thiem
------------------------------------------------------------------------
Thiem's Profile: http://www.excelforum.com/member.php...o&userid=27474
View this thread: http://www.excelforum.com/showthread...hreadid=495454

  #7   Report Post  
Posted to microsoft.public.excel.misc
Robert57
 
Posts: n/a
Default Join text


Tnx all of you. I will try it during the chrismas.

Merry Chrismas to you.


--
Robert57
------------------------------------------------------------------------
Robert57's Profile: http://www.excelforum.com/member.php...o&userid=29838
View this thread: http://www.excelforum.com/showthread...hreadid=495454

  #8   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Join text

You won't be able to do this kind of thing using a worksheet function (even a
UDF).

But you could use a macro.

This sample just does A1:A3 and puts the formatted string in B1. But depending
on where your data is and how it's laid out, it could be changed to loop through
those cells.

Remember that after the cell is concatenated and formatted, it's not a formula.
Changing A1:A3 won't change B1--you have to run the macro again.

Option Explicit
Sub testme()

Dim myCell As Range
Dim myRng As Range
Dim DestCell As Range
Dim myStr As String
Dim lCtr As Long
Dim iCtr As Long

With ActiveSheet
Set DestCell = .Range("b1")
Set myRng = .Range("a1:a3")
myStr = ""
For Each myCell In myRng.Cells
myStr = myStr & myCell.Text
Next myCell
With DestCell
.NumberFormat = "@"
.Value = myStr
End With
End With

lCtr = 0
For Each myCell In myRng.Cells
For iCtr = 1 To Len(myCell.Text)
lCtr = lCtr + 1
With DestCell.Characters(lCtr, 1).Font
.Name = myCell.Characters(iCtr, 1).Font.Name
.FontStyle = myCell.Characters(iCtr, 1).Font.FontStyle
.Size = myCell.Characters(iCtr, 1).Font.Size
.Strikethrough = myCell.Characters(iCtr, 1).Font.Strikethrough
.Superscript = myCell.Characters(iCtr, 1).Font.Superscript
.Subscript = myCell.Characters(iCtr, 1).Font.Subscript
.OutlineFont = myCell.Characters(iCtr, 1).Font.OutlineFont
.Shadow = myCell.Characters(iCtr, 1).Font.Shadow
.Underline = myCell.Characters(iCtr, 1).Font.Underline
.ColorIndex = myCell.Characters(iCtr, 1).Font.ColorIndex
.Bold = myCell.Characters(iCtr, 1).Font.Bold
.Italic = myCell.Characters(iCtr, 1).Font.Italic
End With
Next iCtr
Next myCell

End Sub

Robert57 wrote:

Ok. I will try to explain.
I want to join text from several cells and I'm using a function
"Sammafoga(A1;a2;a3)"
But I want the text to be formatted in the recevied cell, i.e. font
size from A1 shall be 18, a2 italic and a3 normal.

How do I do that?

tnx for your answer
Robert

--
Robert57
------------------------------------------------------------------------
Robert57's Profile: http://www.excelforum.com/member.php...o&userid=29838
View this thread: http://www.excelforum.com/showthread...hreadid=495454


--

Dave Peterson
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
Using Concatenate function to generate text in Text Box Mary S. Charts and Charting in Excel 1 December 14th 05 08:55 PM
merged cells into one text cell, size varies dependant on text dat Jazzylady825 Excel Discussion (Misc queries) 0 December 9th 05 08:26 PM
Text shown up in other cells everytime a text is entered in 1 cell bioyyy Excel Discussion (Misc queries) 1 August 26th 05 05:26 PM
SUMPRODUCT vs Text??? Ken Excel Worksheet Functions 2 April 9th 05 07:21 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


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