chnage value

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
You would have to supply additional details, right now all you would have to do is go to the cell that =1 and make it =0
 
Upvote 0
I have a worksheet that has site code in column "F" and the software brings over 1, I need to change the value of all the cells in column "F" that has a "1" to a "00".
 
Upvote 0
I believe you would require to set the cell format to text first.

Possibly
Code:
Sub Button1_Click()
    Dim LstRw As Long, rNg As Range, c As Range
    
    LstRw = Cells(Rows.Count, "F").End(xlUp).Row
    Set rNg = Range("F1:F" & LstRw)
    
    Application.ScreenUpdating = False
    
    For Each c In rNg.Cells
    
        If c = 1 Then
            c.NumberFormat = "@"
            c = "00"
        End If

    Next c
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,387
Messages
6,124,633
Members
449,177
Latest member
Sousanna Aristiadou

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top