Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel trim function maybe?
I need to search the spreadsheet/table to find the first blank row " " -
Column A or the words "Elimination Totals". The function should delete that row and all the rows below it. Note - each spreadsheet has elimination totals on different rows however they are located under column C on all the spreadsheets. Please note that this file will be later imported to access. and also later the macro/vba code/or functions might be cut out of excel and used into access too. -- Tech Learner |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel trim function maybe?
Try this code.
Sub delrows() lastrow = Cells(Rows.Count, "A").End(xlUp).Row Set colARange = Range("A1:A" & lastrow) Set c = colARange.Find(what:="Elimination Totals", _ LookIn:=xlValues) If c Is Nothing Then Rows("1:" & lastrow).Delete Else Rows("1:" & c.Row).Delete End If End Sub "Nakli" wrote: I need to search the spreadsheet/table to find the first blank row " " - Column A or the words "Elimination Totals". The function should delete that row and all the rows below it. Note - each spreadsheet has elimination totals on different rows however they are located under column C on all the spreadsheets. Please note that this file will be later imported to access. and also later the macro/vba code/or functions might be cut out of excel and used into access too. -- Tech Learner |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Trim function to remove blank spaces in Excel | Excel Discussion (Misc queries) | |||
Trim Function | Excel Worksheet Functions | |||
Problem with TRIM function in Excel | Excel Programming | |||
Trim function in VBA | Excel Programming | |||
Trim function in Excel Doesn't work for certain cells | Excel Programming |