A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Convert MM to inch and add to comment



 
 
Thread Tools Display Modes
  #1  
Old December 4th, 2007, 07:25 AM posted to microsoft.public.excel.worksheet.functions
rpick60
external usenet poster
 
Posts: 13
Default Convert MM to inch and add to comment

How would I convert a number from MM to Inch and add the results to
the comment?
here is what is the cell
800X400X300
the results can be entered in to a comment
31.496X15.748X11.811
or
31.496
15.748
11.811

the formula is 800/25.4= 31.496

Thanks in advanced
  #2  
Old December 4th, 2007, 08:51 AM posted to microsoft.public.excel.worksheet.functions
Stefi
external usenet poster
 
Posts: 1,841
Default Convert MM to inch and add to comment

This sub does the job with activecell, adjust ranges as required!
Change "X" to Chr(10) for second format!

Sub mmtoinch()
dimarray = Split(ActiveCell, "X")
ActiveCell.ClearComments
ActiveCell.AddComment (Format(dimarray(0) / 25.4, "###.000") & "X" & _
Format(dimarray(1) / 25.4, "###.000") & "X" & _
Format(dimarray(2) / 25.4, "###.000"))
End Sub

Regards,
Stefi

„rpick60” ezt *rta:

How would I convert a number from MM to Inch and add the results to
the comment?
here is what is the cell
800X400X300
the results can be entered in to a comment
31.496X15.748X11.811
or
31.496
15.748
11.811

the formula is 800/25.4= 31.496

Thanks in advanced

  #3  
Old December 4th, 2007, 12:49 PM posted to microsoft.public.excel.worksheet.functions
rpick60
external usenet poster
 
Posts: 13
Default Convert MM to inch and add to comment

On Dec 4, 3:51 am, Stefi wrote:
This sub does the job with activecell, adjust ranges as required!
Change "X" to Chr(10) for second format!

Sub mmtoinch()
dimarray = Split(ActiveCell, "X")
ActiveCell.ClearComments
ActiveCell.AddComment (Format(dimarray(0) / 25.4, "###.000") & "X" & _
Format(dimarray(1) / 25.4, "###.000") & "X" & _
Format(dimarray(2) / 25.4, "###.000"))
End Sub

Regards,
Stefi

rpick60" ezt rta:



How would I convert a number from MM to Inch and add the results to
the comment?
here is what is the cell
800X400X300
the results can be entered in to a comment
31.496X15.748X11.811
or
31.496
15.748
11.811


the formula is 800/25.4= 31.496


Thanks in advanced- Hide quoted text -


- Show quoted text -


Thanks it work great
  #4  
Old December 4th, 2007, 02:38 PM posted to microsoft.public.excel.worksheet.functions
Stefi
external usenet poster
 
Posts: 1,841
Default Convert MM to inch and add to comment

You are welcome! Thanks for the feedback!
Stefi

„rpick60” ezt *rta:

On Dec 4, 3:51 am, Stefi wrote:
This sub does the job with activecell, adjust ranges as required!
Change "X" to Chr(10) for second format!

Sub mmtoinch()
dimarray = Split(ActiveCell, "X")
ActiveCell.ClearComments
ActiveCell.AddComment (Format(dimarray(0) / 25.4, "###.000") & "X" & _
Format(dimarray(1) / 25.4, "###.000") & "X" & _
Format(dimarray(2) / 25.4, "###.000"))
End Sub

Regards,
Stefi

„rpick60" ezt *rta:



How would I convert a number from MM to Inch and add the results to
the comment?
here is what is the cell
800X400X300
the results can be entered in to a comment
31.496X15.748X11.811
or
31.496
15.748
11.811


the formula is 800/25.4= 31.496


Thanks in advanced- Hide quoted text -


- Show quoted text -


Thanks it work great

  #5  
Old December 5th, 2007, 03:08 PM posted to microsoft.public.excel.worksheet.functions
Dana DeLouis
external usenet poster
 
Posts: 468
Default Convert MM to inch and add to comment

the results can be entered into a comment
31.496X15.748X11.811


Just a technique for display might be to use the Multiplication symbol
instead of the letter X.

Sub Demo()
Dim j As Long
Dim v As Variant

With ActiveCell
'// Remove...
.Value = "800X400X300"

v = Split(Trim(.Value), "X")

For j = LBound(v) To UBound(v)
v(j) = Format(v(j) / 25.4, "#.000")
Next j

.ClearComments
.AddComment Join(v, Space(1) & Chr(215) & Space(1))
.Comment.Shape.TextFrame.AutoSize = True
End With
End Sub

--
HTH
Dana DeLouis

"rpick60" wrote in message
...
How would I convert a number from MM to Inch and add the results to
the comment?
here is what is the cell
800X400X300
the results can be entered in to a comment
31.496X15.748X11.811
or
31.496
15.748
11.811

the formula is 800/25.4= 31.496

Thanks in advanced


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:19 PM.


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