Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default select specific records

I want to select specific records that match a criteria in a column.
Basically I want to select records where the column has either an "e" or a
"b". No blanks. Can somebody help me?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default select specific records

Try something like

Dim TotalRng As Range
Dim Rng As Range
For Each Rng In _
Application.Intersect(ActiveSheet.UsedRange,
ActiveSheet.Columns(1)).Cells
If Rng.Text = "e" Or Rng.Text = "b" Then
If TotalRng Is Nothing Then
Set TotalRng = Rng
Else
Set TotalRng = Application.Union(TotalRng, Rng)
End If
End If
Next Rng
TotalRng.Select


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





"Rob" wrote in message
...
I want to select specific records that match a criteria in a
column.
Basically I want to select records where the column has either
an "e" or a
"b". No blanks. Can somebody help me?



  #3   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default select specific records

I don't think I need the intersect function. I am selecting cells from
Column "L" that are popultated with either an "e", or a "b". This gives me
an error away.

"Rob" wrote:

I want to select specific records that match a criteria in a column.
Basically I want to select records where the column has either an "e" or a
"b". No blanks. Can somebody help me?

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
Select records by month PlarfySoober New Users to Excel 3 September 16th 09 08:13 PM
Select records to new workbook wal50 Excel Discussion (Misc queries) 2 September 20th 07 01:26 PM
Randomly Select Records Critzy Excel Worksheet Functions 6 March 12th 07 10:41 PM
select records with a specific value AMK Excel Worksheet Functions 3 June 22nd 05 11:53 AM
select records using VBA No Name Excel Programming 5 April 2nd 04 09:00 PM


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

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

About Us

"It's about Microsoft Excel"