Max and min with text criteria

SamRezound82

New Member
Joined
Apr 29, 2015
Messages
4
Based on different text criteria, I am trying to return the Max and Min numbers for each criteria from a separate table

Example:

Criteria Table:

Unit
Type Min Rent Max Rent
0 BR ______ _______

1 BR _______ _______

2 BR _______ _______

3 BR _______ _______


Data Table:

Type Rent
0 BR 4,000
0 BR 3,500
0 BR 5,500
1 BR 6,000
1 BR 2,500
1 BR 6,200
2 BR 8,000
2 BR 4,500
2 BR 7,000
3 BR 10,000
3 BR 12,000
3 BR 11,000
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
How about...

These are CSE formulas

Data Range
A​
B​
C​
D​
E​
F​
G​
H​
I​
1​
Type​
Rent​
Max​
Min​
Max​
E2:=MAX(IF($A$2:$A$13=$D2,$B$2:$B$13))​
2​
0 BR​
4,000​
0 BR​
5,500​
3,500​
Min​
F2:=MIN(IF($A$2:$A$13=$D2,$B$2:$B$13))​
3​
0 BR​
3,500​
1 BR​
6,200​
2,500​
4​
0 BR​
5,500​
2 BR​
8,000​
4,500​
5​
1 BR​
6,000​
3 BR​
12,000​
10,000​
6​
1 BR​
2,500​
7​
1 BR​
6,200​
8​
2 BR​
8,000​
9​
2 BR​
4,500​
10​
2 BR​
7,000​
11​
3 BR​
10,000​
12​
3 BR​
12,000​
13​
3 BR​
11,000​
 
Upvote 0
Thank you. It seemed CSE was the way to go.

The other problem I have is that there is one 4 BR but it is vacant where column b would have Vacant (see below). It should return 0 or - instead of an error code if possible.

A B
4 BR Vacant
 
Upvote 0
It returns a zero for me. What exactly does it return for you?

E2: =MAX(IF($A$2:$A$14=$D2,$B$2:$B$14))

Data Range
A​
B​
C​
D​
E​
F​
1​
Type​
Rent​
Max​
Min​
2​
0 BR​
4,000​
0 BR​
5,500​
3,500​
3​
0 BR​
3,500​
1 BR​
6,200​
2,500​
4​
0 BR​
5,500​
2 BR​
8,000​
4,500​
5​
1 BR​
6,000​
3 BR​
12,000​
10,000​
6​
1 BR​
2,500​
4 BR​
0​
0​
7​
1 BR​
6,200​
8​
2 BR​
8,000​
9​
2 BR​
4,500​
10​
2 BR​
7,000​
11​
3 BR​
10,000​
12​
3 BR​
12,000​
13​
3 BR​
11,000​
14​
4 BR​
Vacant​
 
Upvote 0
Hi Jeffrey Brown

I'm reading through posts to see if I can find a solution before posting a new thread and this one looks like it may get me started in the right direction. I do have one question though - can this CSE (had to google to see what that stood for), be used on WorksheetA to find data values on multiple worksheets and place those found values back on WorksheetA in? Possibly not a Yes or No question but thank you.

Then try to wrap it with IFERROR

=IFERROR(MAX(IF($A$2:$A$14=$D2,$B$2:$B$14)),"")
 
Upvote 0
Yes, an array formula (CSE) can be used to pull from different areas within a workbook.

IMPORTANT
  • This is an array formula
  • Enter the formula >> press F2 then >> CTRL + SHIFT + ENTER
  • If entered correctly, the formula will be enclosed in {brackets}
  • Do not enter the {brackets} manually

As you can see here...

=MAX(IF('Min Max'!$A$2:$A$14=$A2,'Min Max'!$B$2:$B$14))

There is a tab called Min Max and I'm pulling the information to an entirely separate tab.

Hope this helps...
 
Upvote 0

Forum statistics

Threads
1,215,477
Messages
6,125,037
Members
449,205
Latest member
Eggy66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top