• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA Code Required

Suri

New Member
I Have Cantain Name Like "Nowebsite". I want to create next blank Row.


Example:- xxxxx

xxxxx

NO WEBSITE

"I need blank row"

xxxxx

XXXXX

XXXXX

XXXXX

XXXXX

XXXXX

XXXXX

NO WEBSITE

"I need blank row"

XXXXX

NO WEBSITE

"I need blank row"


Like I want plz let mee any vba code.......
 
Hi Suri,


Assuming you have data at sheet4 as follows:


NO WEBSITE

s

d

e

NO WEBSITE

s

d

e

r

t

NO WEBSITE

sc

d

f

NO WEBSITE

y


Now please paste the following code in a standard module and run it. This should insert a blank row after the word NO WEBSITE.


Sub AddBlankRows()


Dim lngRow As Long


'// Assuming data is at Sheet4 - Change to suit

For lngRow = Sheet4.UsedRange.Rows.Count To 1 Step -1


'// Assuming Column A, change to suit

If UCase$(Sheet4.Cells(lngRow, 1).Value) = "NO WEBSITE" Then


Sheet4.Range("A" & CStr(lngRow + 1)).Select

Selection.EntireRow.Insert , CopyOrigin:=xlFormatFromLeftOrAbove

End If


Next


End Sub


Kaushik
 
Back
Top