View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 153
Default Macro : seeking max value after an Autofilter

There may be a better way, but one way to do it would be
to copy special, visible and put the copy somewhere. Find
your max on the copied data, store it in a variable, then
erase the copied data.

-----Original Message-----
Dear Experts,

My excel sheet encloses 2 columns :
- 1st column is a zip code with Data/Filter/Autofilter

on.
- 2nd column is a number
In a macro :
- I filter data of the1st colum using the autofilter

(i.e. Selection.AutoFilter Field:=1, Criteria1:="10080")
- I want then to get the max of the resulting numbers in

the 2nd one but how can I specify I want the max of the
subset of data and not the max of the full data enclosed
in the column (i.e. when no filter is not set on 1st
column) ?

Any help greatly appreciated.
Regards,
Jerome.
.