#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Filtering

I am trying to write a macro to help me in my filtering of a list of
data. I have a list of references and I need to filter the list of
references according to the following criteria:

1) Starts with 325 and
2) last three digits =100 AND <150, OR last three digits =250 AND
<300

My list of references looks like this:
3513338009
3513338032
3883338008
3953338166
3953338167
3953338171
3953338274
3193338861
...

I tried to use the excel function [=right()] but however, this function
returns a text and I am unable to filter my list according to my
criterial. Can anyone help me on this? thanks!


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Filtering

Hi,

try
=value(right(A1,3))
this will give you a number instead of text.


in the same cell you could write a formula that checks all criteria and
results in an "x" or nothing if all criteria are met. then you can filter by
"x". so, you wouldn't have to bother too much with the criteria when
filtering.

arno

"desmondleow" schrieb im
Newsbeitrag ...
I am trying to write a macro to help me in my filtering of a list of
data. I have a list of references and I need to filter the list of
references according to the following criteria:

1) Starts with 325 and
2) last three digits =100 AND <150, OR last three digits =250 AND
<300

My list of references looks like this:
3513338009
3513338032
3883338008
3953338166
3953338167
3953338171
3953338274
3193338861
..

I tried to use the excel function [=right()] but however, this function
returns a text and I am unable to filter my list according to my
criterial. Can anyone help me on this? thanks!


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Filtering

add another columnfor the right three digits
You're really doing three things, taking a number,
converting it to text, taking the right three characters
and then putting them back as numbers

so your "filter" is

IF left(text,3)= "325" and _
clng(Right(text,3))=100 and _
clng(Right(text,3))<=150 then


for a simpler solution just add an extra column with the
=right( ,3) the add this column to the filter

-----Original Message-----
I am trying to write a macro to help me in my filtering

of a list of
data. I have a list of references and I need to filter

the list of
references according to the following criteria:

1) Starts with 325 and
2) last three digits =100 AND <150, OR last three

digits =250 AND
<300

My list of references looks like this:
3513338009
3513338032
3883338008
3953338166
3953338167
3953338171
3953338274
3193338861
...

I tried to use the excel function [=right()] but

however, this function
returns a text and I am unable to filter my list

according to my
criterial. Can anyone help me on this? thanks!


---
Message posted from http://www.ExcelForum.com/

.

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
filtering halb1961 Excel Discussion (Misc queries) 3 February 26th 08 12:23 AM
filtering CMD Excel Discussion (Misc queries) 2 February 5th 08 08:59 AM
Filtering by row Andy K Excel Discussion (Misc queries) 1 April 9th 07 06:40 AM
Filtering ? Tarjei Lundarvollen Excel Worksheet Functions 7 July 18th 05 11:00 PM
trouble filtering a list. Why isn't column filtering? Pat Excel Worksheet Functions 1 July 18th 05 03:30 PM


All times are GMT +1. The time now is 10:32 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"