![]() |
|
#1
|
|||
|
|||
|
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
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Macro to convert text to endnote?
|
Orifacious | Word VBA | 27 | 03-29-2022 02:58 PM |
Macro to replace Image, Numbers in Table and in multiple protected word document
|
balaji | Word VBA | 10 | 03-24-2016 02:11 AM |
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 |
Convert numbers to a specific text string
|
francis | Excel | 1 | 10-06-2011 01:43 PM |