How to delete rows with space at front..?

zaidan

New Member
Joined
Sep 18, 2008
Messages
34
1. I have data with thousand rows, but i want to delete the the data that have 19 space at front using macro because to delete manually it cost lots of time.
data :
201011110900 AAXX 11094 97460 21459 70000 10256 20242 30062 40071 52015 72996 84876
___________________333 56200 57921 60067 81917 83818 80959
___________________80858=
201011111200 AAXX 11124 97460 01458 70000 10248 20239 30082 40091 60071 72162 84972
___________________333 10318 56000 57902 59002 69987 81917 83818
___________________80959=
201011111500 AAXX 11154 97460 31458 70000 10236 20228 30078 40085 57006 83836

result i want:
201011110900 AAXX 11094 97460 21459 70000 10256 20242 30062 40071 52015 72996 84876
201011111200 AAXX 11124 97460 01458 70000 10248 20239 30082 40091 60071 72162 84972
201011111500 AAXX 11154 97460 31458 70000 10236 20228 30078 40085 57006 83836


2. what is the formula to add dot or comma at the middle of the text or number:
data :
3333
10078

result :
33.33
1007.8

thanks for any help
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Code:
Sub Delete19Spaces()
    
    Dim spaces As String, i As Long, iPos As Integer
    
    spaces = String(19, " ")
    
    For i = 1 To Cells(1, 1).End(xlDown).Row
        If InStr(Cells(i, 1), spaces) > 0 Then Cells(i, 1).EntireRow.Delete
    Next
    
End Sub
 
Upvote 0
thanks a lot sektor for your quick reply.. it's work fine....

can you help to solve my second problem...?
 
Upvote 0
Actually, it aint' clear what's the location of dot/comman should be.
 
Upvote 0
i have numbers of data in several column. for example in column A i want to put dot after second text (3333 => 33.33) and in column B i want to put dot after fourth text (10078 =>1007.8).

thanks in advance
 
Upvote 0
i have numbers of data in several column. for example in column A i want to put dot after second text (3333 => 33.33) and in column B i want to put dot after fourth text (10078 =>1007.8).

thanks in advance

If the numbers have the same amount of digits per your sample, maybe something like these formulas may help?

=LEFT(A1,2)&"."&RIGHT(A1,2)

=LEFT(B1,4)&"."&RIGHT(B1,1)
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

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