Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-08-2014, 10:43 AM
Carchee Carchee is offline Search a cell that contains words and numbers and convert the numbers to metric Windows 7 64bit Search a cell that contains words and numbers and convert the numbers to metric Office 2007
Advanced Beginner
Search a cell that contains words and numbers and convert the numbers to metric
 
Join Date: Dec 2013
Posts: 46
Carchee is on a distinguished road
Default

Nice, I had to alter the code a bit to get it to work. This is what I did:
Code:
  If InStr(StrConv, "-") > 0 Then
                StrConv = Split(StrConv, "-")(0) + Split(Split(StrConv, "-")(1), "/")(0) / Split(Split(StrConv, "-")(1), "/")(1)
                Else
               If InStr(StrConv, "/") > 0 Then
                  StrConv = Split(StrConv, "/")(0) / CSng(Split(StrConv, "/")(1))
                End If
              End If
It all works nicely and I don't get any errors and I don't have to create another sheet to get the job done.

If I decide to use the superscript Sub how would I go through and delete the carrot '^' after it is superscripted so just the number is left? I tried using a replace which did delete the '^' symbol but it was un-superscripting the numbers. I used the following code:


Code:
With .Cells(i, 3)
    Columns("C").Replace what:="^", replacement:=""
    End With
After the 'Next' and before the 'End With' 'Application.ScreenUpdating = True' at the end of the whole Sub
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Words in my document were converted to numbers???? MikeD23 Word 1 08-26-2012 11:09 AM
can word convert numbers? koolfire Word 2 01-07-2012 02:12 PM
Search a cell that contains words and numbers and convert the numbers to metric Convert numbers to a specific text string francis Excel 1 10-06-2011 01:43 PM
Numbers in Words janak Excel 2 12-19-2010 08:53 PM
Numbers Convert in word in MS Access towhid Office 0 08-19-2010 01:17 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft