ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Discounts within Ranges (https://www.excelbanter.com/excel-programming/378477-discounts-within-ranges.html)

FIRSTROUNDKO via OfficeKB.com

Discounts within Ranges
 
Hi!

Im trying to discount from range("A1") if its value is between a set of
values i.e 500 to 1000 would 5%

the below cell would be range A3 TO B6

0 - 1000 5%
1001 - 2000 7.5%
2001 - 3000 10.0%
3001 + 12.5%

and I would like to populate cells c3 to c6 by macro

Thanks in advance

Darren

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200611/1


Bob Phillips

Discounts within Ranges
 
=INDEX(B3:B6,MATCH(1,(----TRIM(LEFT(A3:A6,FIND("-",A3:A6)-1))<=A1)*(--TRIM(MID(A3:A6,FIND("-",A3:A6)+1,99))=A1),0))

which is an array formula, you need to commit with Ctrl-Shift-Enter, not
just Enter.

--
HTH

Bob

(change the xxxx to gmail if mailing direct)
"FIRSTROUNDKO via OfficeKB.com" <u15639@uwe wrote in message
news:6a1271b918a67@uwe...
Hi!

Im trying to discount from range("A1") if its value is between a set of
values i.e 500 to 1000 would 5%

the below cell would be range A3 TO B6

0 - 1000 5%
1001 - 2000 7.5%
2001 - 3000 10.0%
3001 + 12.5%

and I would like to populate cells c3 to c6 by macro

Thanks in advance

Darren

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200611/1





All times are GMT +1. The time now is 07:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com