Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-11-2016, 12:48 AM
rsrasc rsrasc is offline Need Macro to Convert Text To Numbers in Multiple Sheets Windows 10 Need Macro to Convert Text To Numbers in Multiple Sheets Office 2013
Competent Performer
Need Macro to Convert Text To Numbers in Multiple Sheets
 
Join Date: Mar 2014
Location: Germany
Posts: 148
rsrasc is on a distinguished road
Default Need Macro to Convert Text To Numbers in Multiple Sheets

Hi all,



I have a file with 40 sheets. The first sheet is named "MyData". The other 39 sheets are named "Page 1" thru "Page 39".

The following code works fine for sheet "MyData".

I have searched the Internet to see if I could find information or a macro that will help me do the same for the other 39 sheets but I have not been successful.


Code:
 
Sub Converting_Text_To_Numbers_1()
 
    Range("D6:F385").Select 'specify the range which suits your purpose-same range for all other sheets
 
 
    With Selection
        Selection.NumberFormat = "###000"
        .Value = .Value
    End With
 
End Sub

For example, the following two (2) codes below are working fine for the 39 sheets but I can't get it to work with the above code.

So if someone can help me with this, I will appreciate it.

Code:
Sub Check_NumberUnMerged()
'
' testmac1 Macro
'
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
    With ws
        .Range("CB6:CC205").UnMerge
 
    ' and so on
    '
    End With
Next ws
End Sub

Code:
 
Sub ChangeFont()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Sheets
    ws.Cells.Font.Name = "Calibri"
    ws.Cells.Font.Size = "10"
Next
End Sub
Thanks!
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Macro to Convert Text To Numbers in Multiple Sheets Macro to convert text to endnote? Orifacious Word VBA 27 03-29-2022 02:58 PM
Need Macro to Convert Text To Numbers in Multiple Sheets Macro to replace Image, Numbers in Table and in multiple protected word document balaji Word VBA 10 03-24-2016 02:11 AM
Need Macro to Convert Text To Numbers in Multiple Sheets I need to convert shaded text into highlighted text on about 80 different long documents. VBA macro? AustinBrister Word VBA 8 05-28-2015 02:42 PM
Search a cell that contains words and numbers and convert the numbers to metric Carchee Excel Programming 36 10-08-2014 03:16 PM
Need Macro to Convert Text To Numbers in Multiple Sheets Convert numbers to a specific text string francis Excel 1 10-06-2011 01:43 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:27 PM.


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