Range reference and return

PritiOne

Active Member
Joined
Jun 2, 2004
Messages
357
Hello. Hope all had a wonderful holiday!

I am looking for help on the folowing:

I have 3 defined ranges, say Range 1, Range 2, and Range 3 defined on a sheet in a workbook.
On another sheet "Input Sheet" I have a list input by a user.

I need to know how to write a formula (could be elsewhere in the workbook) so that if the user chooses at lease 1 "product" from Rang 1, and at least one "product" from Range 2, and at least one "product" from Range 3 on the "Input Sheet" a result would follow as "1% discount".

Please let me know if you need any further information & Thanks in advance for the help!!!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
How does the user "choose" a product? (list box, typed in, etc.)
 
Upvote 0
The user types in a product number - there is a list of over 700 products, but if product from Range 1, Range 2, and Range 3, then the discount should apply... Ranges 1-3 doen not include all products.
 
Upvote 0
Hi,

This is one way:

Formula needs to be entered with Ctrl + shift + enter.
Book1
ABCDE
1Shop listList1List2List3
2aaek
3ebfl
4kcgm
5dh
6i
7j
8
9Discount
101%
Sheet2
 
Upvote 0
Thanks for the help.. just wondering what you mean by:

Formula needs to be entered with Ctrl + Shift + Enter

also.. I am trying to paste the formula, not exacly reading as a formula (reading as text) Something to do with the above questions?

Thanks again!
 
Upvote 0
If you paste fairwind's formula into the formula bar, you can't just press ENTER to get the value of the formula. You have to hold down CTRL and SHIFT while you press ENTER, as his formula is an array formula.

The "not exactly reading as a formula (reading as text)" could have to do with how your cell is formatted. Make sure your destination cell is formatted as percentage before you put the formula there.
 
Upvote 0
Yes!

And when you past it it should be without the curly brackets:

=IF(MAX(--ISNUMBER(MATCH($A$2:$A$10,C2:C5,0)))*MAX(--ISNUMBER(MATCH($A$2:$A$10,D2:D7,0)))*MAX(--ISNUMBER(MATCH($A$2:$A$10,E2:E4,0))),1%,0)

They appear when you press ctrl + shift + enter

If you past with the curly brackets formula will be threated as text.
 
Upvote 0
Ok - I am holding down the Ctrl + Shift + Enter and not getting a result...

I've altered the formula to read the defined ranges:

{=IF(MAX(--ISNUMBER(MATCH(NewProdList,MedMains,0)))*MAX(--ISNUMBER(MATCH(NewProdList,Connect,0)))*MAX(--ISNUMBER(MATCH(NewProdList,Assessment,0))),1%,0)}

Please help!
 
Upvote 0
Thank you.. I got the formula in.. Now I will test it out.

Thanks to both for your assistance :)
 
Upvote 0
ok - The formula isn't exactly working.

I have a list of products.. some that are included in the defined ranges and some that are not. If my user selects a product from range 1, range 2, and range 3.. (but also can select from products that are not in the ranges) the formula should result in 1%, otherwise result in 0%.

Have I done something wrong?

=IF(MAX(--ISNUMBER(MATCH(NewProdList,MedMains,0)))*MAX(--ISNUMBER(MATCH(NewProdList,Connect,0)))*MAX(--ISNUMBER(MATCH(NewProdList,Assessment,0))),1%,0%)

The defined range of "NewProdList" is where the user inputs his products.
 
Upvote 0

Forum statistics

Threads
1,215,655
Messages
6,126,054
Members
449,283
Latest member
GeisonGDC

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