Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 947
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


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
formula to convert decimal feet to feet inch sixteenths tv Excel Discussion (Misc queries) 24 May 3rd 23 11:41 AM
Professional engineering graph sheets 10 x 10/inch and 8 x 8/inch Fugro-Karen Charts and Charting in Excel 1 May 5th 06 01:37 PM
convert decimal to inch & fraction davepatrob Excel Discussion (Misc queries) 1 December 31st 05 05:05 AM
Row and column, value = 1 inch Pierre-Yves Ste-Marie Excel Discussion (Misc queries) 1 January 4th 05 10:12 PM
a comment plugin & copy paste directly from excel to comment ? fr. RFM Excel Worksheet Functions 0 December 1st 04 11:29 PM


All times are GMT +1. The time now is 09:59 AM.

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"