how to delete upto particular text in cell

aswathy0001

New member
Joined
Nov 29, 2016
Messages
24
Reaction score
0
Points
0
Location
india
Excel Version(s)
2010
how i get to delete the values from A1 to cell value "Retail Dealers"
and vice verse
from last cell to cell contain text "International Sales"

I need cells between Retail Dealers and International Sales
 
Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.


Remember to desensitize the data.
 
Try this

Code:
Sub test()
Dim rng1 As Range, rng2 As Range


Set rng1 = Range("A1")
Set rng2 = Range("A:A").Find("Retail Dealers").Offset(-1, 0)
Range(rng1, rng2).ClearContents 'or .EntireRow.Delete


Set rng1 = Range("A:A").Find("International Sales").Offset(1, 0)
Set rng2 = rng1.End(xlDown)
Range(rng1, rng2).ClearContents 'or .EntireRow.Delete


End Sub

Norm
 
Back
Top