Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to create a macro that will search through all customer numbers in a
particular column, and delete the rows that contain customer numbers that start with a numeral. The customer numbers that start with a letter are the ones I need. How can I make this happen? I was thinking along the lines of Find and Replace, but can't figure it out. Can someone help me? Thanks! Ryan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This might be a silly question, but why not just sort the sheet, which will
float the numerals to the top or bottom and then just delete them from there? It is manual but easy... "Neutron1871" wrote: I need to create a macro that will search through all customer numbers in a particular column, and delete the rows that contain customer numbers that start with a numeral. The customer numbers that start with a letter are the ones I need. How can I make this happen? I was thinking along the lines of Find and Replace, but can't figure it out. Can someone help me? Thanks! Ryan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this on a backup copy of your data
It assumes account number in column A Sub DelRecords() Dim lRow As Long For lRow = Cells(Rows.Count, "a").End(xlUp).Row _ To 1 Step -1 Select Case Left(Cells(lRow, "a"), 1) Case 0 To 9 Rows(lRow).Delete End Select Next lRow End Sub "?B?SmltIFRob21saW5zb24=?=" wrote in message ... This might be a silly question, but why not just sort the sheet, which will float the numerals to the top or bottom and then just delete them from there? It is manual but easy... "Neutron1871" wrote: I need to create a macro that will search through all customer numbers in a particular column, and delete the rows that contain customer numbers that start with a numeral. The customer numbers that start with a letter are the ones I need. How can I make this happen? I was thinking along the lines of Find and Replace, but can't figure it out. Can someone help me? Thanks! Ryan |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It works. Thank you so much!!!
"Mudraker" wrote: Try this on a backup copy of your data It assumes account number in column A Sub DelRecords() Dim lRow As Long For lRow = Cells(Rows.Count, "a").End(xlUp).Row _ To 1 Step -1 Select Case Left(Cells(lRow, "a"), 1) Case 0 To 9 Rows(lRow).Delete End Select Next lRow End Sub "?B?SmltIFRob21saW5zb24=?=" wrote in message ... This might be a silly question, but why not just sort the sheet, which will float the numerals to the top or bottom and then just delete them from there? It is manual but easy... "Neutron1871" wrote: I need to create a macro that will search through all customer numbers in a particular column, and delete the rows that contain customer numbers that start with a numeral. The customer numbers that start with a letter are the ones I need. How can I make this happen? I was thinking along the lines of Find and Replace, but can't figure it out. Can someone help me? Thanks! Ryan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hpw do I delete multiple empty rows found between filled rows? | Excel Worksheet Functions | |||
How to Delete empty rows in excel in b/w rows with values | Excel Worksheet Functions | |||
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows | Excel Worksheet Functions | |||
How to delete rows when List toolbar's "delete" isnt highlighted? | Excel Worksheet Functions | |||
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below | Excel Programming |