![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Where the wild roses grow
Posts: 285
|
What would the macro code be to do the following. When I press the button I need it to go through the sheet, looking in every cell. If the info in the cell begins with : then I need it put 00 before it. Is that possible? |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Every Cell?
Sub EverySingleCell() Dim x Dim y For x = 1 To 256 For y = 1 To 65536 If Left(Cells(y, x).Value, 1) = ":" Then _ Cells(y, x).Value = "'00" & Cells(y, x).Value Next: Next End Sub OK? Tom |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|