Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Finding the first few characters in a cell

Can anybody help?

What I would like to do is run a macro that will hide
certain rows within a workbook, the position of the rows
is variable, however all of the row I would like to keep
all have the same first 5 Character, (SubTL) I can make it
run through the data and remove lines. The problem is I
can't make it identify which rows contain (SubTL) as the
first 5 Character. Any Ideas?

Thank for you help.

Ben


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Finding the first few characters in a cell

Ben,
Assumed the column is A

Sub Macro10()
For i = 25 To 2 Step -1
If Not Evaluate("EXACT(""SubTL"",LEFT(A" & i & ",5))") Then
Range("A" & i).Delete shift:=xlUp
End If
Next i
End Sub

HTH
Cecil

"Ben E" wrote in message
...
Can anybody help?

What I would like to do is run a macro that will hide
certain rows within a workbook, the position of the rows
is variable, however all of the row I would like to keep
all have the same first 5 Character, (SubTL) I can make it
run through the data and remove lines. The problem is I
can't make it identify which rows contain (SubTL) as the
first 5 Character. Any Ideas?

Thank for you help.

Ben




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regional Settings / Finding out Array separator characters jabaltie New Users to Excel 10 January 1st 10 10:16 AM
convert 5 characters in a cell to 6 characters by adding a zero Helenf Excel Discussion (Misc queries) 4 May 18th 09 04:43 PM
Finding Characters Conditionally - Easy Question Rothman Excel Worksheet Functions 4 August 30th 06 02:24 AM
finding occurance of characters [email protected] Excel Discussion (Misc queries) 4 April 17th 06 11:40 AM
Finding cells with a specific number of characters Kamran Excel Discussion (Misc queries) 6 March 29th 06 11:04 PM


All times are GMT +1. The time now is 04:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"