Wanted to add a blank row after every email address. I was thinking if any part of a cell contains "@" add a blank under it... Wasn't sure how to set the macro for it
B2: =COUNTIF(A1,"*@*")
Copy that formula down through as many rows as you have data
• Select the range containing that formula
• CTRL+F
...Find what: 1
...Click: Options (if necessary)...Look in: Values...Click: Find All
While that window is still open...
• CTRL+A...to select all matching cells...Click: Close
Now all cell containing 1 are selected (and they are 1 row below each email
• Home.Insert.Insert_sheet_rows
[/FONT]
[FONT=Courier New]Sub try()
Dim c As Range
For Each c In Range("A1:A10")
If c.Value Like "*@*" Then
c.Offset(1, 0).EntireRow.Insert
End If
Next c
End Sub
[FONT=Courier New]Sub try()
Dim c As Range
For Each c In Range("A1:A10")
If c.Value Like "*@*" Then
c.Offset(1, 0).EntireRow.Insert
End If
Next c
End Sub[/FONT]
Hi,
Your above code helped me, so can you help me on below :
[TABLE="******* 191"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Step 1[/TD]
[TD]Login[/TD]
[/TR]
[TR]
[TD]Step 2[/TD]
[TD]Validate username[/TD]
[/TR]
[TR]
[TD]Step 3[/TD]
[TD]Logout [/TD]
[/TR]
[TR]
[TD]Step 4[/TD]
[TD]Login DB[/TD]
[/TR]
[TR]
[TD]B. Row
B. Row[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]B. Row[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Step 5[/TD]
[TD]Validate username[/TD]
[/TR]
[TR]
[TD]Step 6[/TD]
[TD]Logout DB[/TD]
[/TR]
</tbody>[/TABLE]
Above i mentioned my case as example.
Query is : after adding a blank row after specific text how i can i correct the numbering(Sequence) of steps. Like previously i was having Total 6 Steps, so after adding blank rows it should show Total 9 Steps. and Blank row should replace with the name as Step "*".
Hi Pedie,
I have entered this code in the macro, and it running when a test it.
But once I am in my excel sheet, the macro don't run automatically once I enter the name. I need always to go in VBA, and click on the "play" button to execute the macro.
Is there a way, once I enter the name, automatically a line is created without going to go myself to press 'run'?
thanks
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.