Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Filtering by three criteria including top ten value

This is hopefully a littler better explanation of an earlier post of
mine. I need to filter a list of information by first the Year and
Product. I then need to know of those now filtered results what are
the top ten results by revenue a third column. Have tryed Large
functions and it didn't work. Any help would be greatly appreciated.

thanks,
Also I have attached my spreadsheet as an example

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Filtering by three criteria including top ten value


There was no attachment. the code below uses autofilter to filter the
3 columns. then the code uses specialcells to select the visible rows
to get the results. I basically recorded a macro and then editied the
macro to simplify the code.



Sub Gettop10()

ColACriteria = "a"
ColBCriteria = "B"
LastRow = Range("A" & Rows.Count).End(xlUp).Row

Columns("A:C").AutoFilter
Columns("A:C").AutoFilter Field:=1, Criteria1:="a"
Columns("A:C").AutoFilter Field:=2, Criteria1:="b"
Columns("A:C").AutoFilter Field:=3, _
Criteria1:="10", Operator:=xlTop10Items

Set top10 = Rows("1:" & LastRow).SpecialCells(Type:=xlCellTypeVisible)

top10.Select

End Sub


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?u=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=196213

http://www.thecodecage.com/forumz

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
SUMPRODUCT with criteria including OR function Struggling in Sheffield[_2_] Excel Discussion (Misc queries) 4 April 22nd 10 10:23 AM
use sumif with criteria including sheet name SleepyCat Excel Worksheet Functions 4 November 24th 08 10:01 PM
Average with 2 criteria including month RS Excel Worksheet Functions 8 August 1st 07 09:46 PM
Sumif with two criteria including a date range Ladyofthewhitecity Excel Discussion (Misc queries) 4 February 4th 07 09:53 AM
coutif with 3 criteria including brackets Ray Excel Worksheet Functions 6 August 23rd 05 07:24 PM


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