Condition for Torow function

pto160

Active Member
Joined
Feb 1, 2009
Messages
478
Office Version
  1. 365
Platform
  1. Windows
Is it possible to use conditions with the Torow function in conjunction with the choosecolumns function? In this example, the condition is order 300.

Book1
ABCDEFG
1AmountNameReceiptOrder
2100John Smitha300
3200Jane Joeb400
4200John Smithc300
5
6Order
7300#NAME?100b200c200
8
9What I like
10300a100c200
Sheet1
Cell Formulas
RangeFormula
B7B7=TOROW(CHOOSECOLS(A2:D4,3,1))
 
It is not clear to me exactly what you are trying to do, or where.
Giving a formula that does not do what you want doesn't tell us much about what you do want.
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi there.
I am trying to sum column C by the voucher number (column B) and have create a unique list by order number to have a row for each order (column A). For example, order 100 has two vouchers- Voucher 1001 and 1003. The sum of voucher 1001 is 125 (50+75) and the sum for voucher 1003 is 10.
I was tying to use a hstack dynamic array formula using the torow function to do all of of this. Maybe I could use a separate lookup formula for the order number to lookup up by the voucher number.
For example, use a lookup formula for the voucher number 1001 to get the order number 100.

Book1
ABCDEF
1Data
2OrderVoucherAmt
3100100150
4100100175
5200100250
6100100310
7
8What I like
9OrderVoucherAmountVoucherAmount
101001001125100310
11200100250
Sheet1
 
Upvote 0
That layout might be a bit tricky, but what about this?

pto160.xlsm
ABC
1Data
2OrderVoucherAmt
3100100150
4100100175
5200100250
6100100310
7
8What I like
9OrderVoucherAmount
101001001125
11100100310
12200100250
Sheet3
Cell Formulas
RangeFormula
A10:C12A10=LET(ov,SORT(UNIQUE(A3:B6),1),a,BYROW(ov,LAMBDA(rw,SUMIFS(C3:C6,A3:A6,INDEX(rw,1),B3:B6,INDEX(rw,2)))),HSTACK(ov,a))
Dynamic array formulas.
 
Upvote 0
Absolutely fantastic. That works wonderful. The things you can do in Excel continue to amaze me. Thanks so much. (y) :)
 
Upvote 0
You are welcome. Thanks for the follow-up. (y)
 
Upvote 0

Forum statistics

Threads
1,215,076
Messages
6,122,983
Members
449,092
Latest member
Mr Hughes

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