Welcome to MacForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

MergeToOneCell

 
   Macintosh computer (Home) -> Excel RSS
Next:  Anyone have some *really* old Apple developer CD'..  
Author Message
Jefferis NoSpamme

External


Since: Mar 07, 2004
Posts: 33



(Msg. 1) Posted: Wed Dec 22, 2004 12:29 am
Post subject: MergeToOneCell
Archived from groups: microsoft>public>mac>office>excel (more info?)

Hi, J.E.
In testing out your code, I kept getting an object missing error and it
failing on the IF fRng Is Nothing condition. The only way I can get it to
work is by commenting out the If codition. Then it works fine if a
selection is made on the spreadsheet.
BTW! Thanks for all our help! I got the codes working and I was able to
attache it to the tool bar button simply by attaching a macro code of the
non, CCT button to the custom button I installed.
Jeff

Public Sub MergeToOneCell()
'J.E. McGimpsey, http://www.mcgimpsey.com/excel/mergedata.html
Const sDelim As String = ", "
Dim rCell As Range
Dim sMergeStr As String
' If rRng Is Nothing Then
Set rRng = Selection
With rRng
For Each rCell In .Cells
sMergeStr = sMergeStr & sDelim & rCell.Text
Next rCell
Application.DisplayAlerts = False
.Merge Across:=False
Application.DisplayAlerts = True
.Item(1).Value = Mid(sMergeStr, 1 - (sDelim <> ""))
End With
End Sub
~~~~~~~~~~~~
Jefferis Peterson, Pres.
Web Design and Marketing
http://www.PetersonSales.com

 >> Stay informed about: MergeToOneCell 
Back to top
Login to vote
JE McGimpsey

External


Since: Mar 07, 2004
Posts: 2394



(Msg. 2) Posted: Wed Dec 22, 2004 12:29 am
Post subject: Re: MergeToOneCell [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <BDEE625C.CF45%jefferisp7@hotmail.com>,
Jefferis NoSpamme <jefferisp7 DeleteThis @hotmail.com> wrote:

 > Hi, J.E.
 > In testing out your code, I kept getting an object missing error and it
 > failing on the IF fRng Is Nothing condition. The only way I can get it to
 > work is by commenting out the If codition. Then it works fine if a
 > selection is made on the spreadsheet.
 > BTW! Thanks for all our help! I got the codes working and I was able to
 > attache it to the tool bar button simply by attaching a macro code of the
 > non, CCT button to the custom button I installed.
 > Jeff

I revamped my site today. Take a look at

<a style='text-decoration: underline;' href="http://www.mcgimpsey.com/excel/mergedata.html" target="_blank">http://www.mcgimpsey.com/excel/mergedata.html</a><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: MergeToOneCell 
Back to top
Login to vote
Jefferis NoSpamme

External


Since: Mar 07, 2004
Posts: 33



(Msg. 3) Posted: Wed Dec 22, 2004 11:12 pm
Post subject: Re: MergeToOneCell [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks.
Will play with it after Xmas!
Great work.
Jeff


On 12/22/04 1:14 AM, in article
jemcgimpsey-8104F7.23141521122004.DeleteThis@msnews.microsoft.com, "JE McGimpsey"
<jemcgimpsey.DeleteThis@mvps.org> wrote:

 >
 > I revamped my site today. Take a look at
 >
<font color=purple> > <a style='text-decoration: underline;' href="http://www.mcgimpsey.com/excel/mergedata.html</font" target="_blank">http://www.mcgimpsey.com/excel/mergedata.html</font</a>>

~~~~~~~~~~~~
Jefferis Peterson, Pres.
Web Design and Marketing
<a style='text-decoration: underline;' href="http://www.PetersonSales.com" target="_blank">http://www.PetersonSales.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: MergeToOneCell 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> Excel All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]