I have a question and would appreciate anyones guidance. I have a list of around 2000 entries each having 7 rows (all entries are numbers). Now I need to find the max value of a certain cell within a range that is limited by other values. So, say I have columns A-G and 2000 rows. I need to find the max value of A in a range where G=X and F=Y. Any help on how to do this? I know how to find the max value of a range, but just don't know how to limit it to only the rows that have a certain value of G and F. Thanks in advance.
Question on limiting range
Collapse
X
-
Tags: None
-
Though there are probably more sophisticated and elegant methods, I'd suggest the simplest would be to loop through all the rows in a VBA macro. For each row, test your various columns against your criteria. If they match, then compare it to your current max value and replace if it's higher.Originally posted by freehockey16I have a question and would appreciate anyones guidance. I have a list of around 2000 entries each having 7 rows (all entries are numbers). Now I need to find the max value of a certain cell within a range that is limited by other values. So, say I have columns A-G and 2000 rows. I need to find the max value of A in a range where G=X and F=Y. Any help on how to do this? I know how to find the max value of a range, but just don't know how to limit it to only the rows that have a certain value of G and F. Thanks in advance.
Comment