BobHoskins
New Member
Hi Guys,
The problem is hard to summarise in the title so I apologise if it's a little confusing (if anyone can think of a better title after understanding the problem, please let me know and I'll change it!). Please take a look at the attached file.
Basically, I need a single formula (i.e. no vba or helper columns) to sum the number of Worms and Beer for Wednesday for people with (JAM) in parentheses after their names only.
There must be a way to do this, does anyone have any thoughts?
"Objective: ONE formula in ONE cell, with no helper columns, and no VBA, to give me the sum of the worms and beer on Wednesday for people with JAM in parentheses only.
•The number of columns will always be the same
•Names will always be in column A and item list will always be in column B
•The item list can be any number of rows
•The item list can include any items, but will always be text strings and every list will always include beer and worms
•I've only put three name s here just to simplify my problem, in reality there will be many more
My thinking:
•Relatively simple array formula to find row number where right(A:A,5)="(JAM)"
•Use these row numbers and either indirect or offset to get the starting cell of the item list
•Use array formula to generate array the exact size of the item list
•Use array formula to get row numbers of instances of worms and beer
•Use index to get intersect of above calculated row and column E.
The closest I've gotten is in cell J8, I've managed to get to get to point three in 'my thinking' but only for the first case, hence the min (I was trying to get it to work for the first instance before I tried it on the whole dataset)."
Please ignore formula length, volatile functions, calculation speeds, and any other of the usual worries of formula construction, I'd just like to know if it's possible!
If there are any questions then please let me know, and if this isn't an appropriate thread then let me know and I'll delete.
Many thanks
The problem is hard to summarise in the title so I apologise if it's a little confusing (if anyone can think of a better title after understanding the problem, please let me know and I'll change it!). Please take a look at the attached file.
Basically, I need a single formula (i.e. no vba or helper columns) to sum the number of Worms and Beer for Wednesday for people with (JAM) in parentheses after their names only.
There must be a way to do this, does anyone have any thoughts?
"Objective: ONE formula in ONE cell, with no helper columns, and no VBA, to give me the sum of the worms and beer on Wednesday for people with JAM in parentheses only.
•The number of columns will always be the same
•Names will always be in column A and item list will always be in column B
•The item list can be any number of rows
•The item list can include any items, but will always be text strings and every list will always include beer and worms
•I've only put three name s here just to simplify my problem, in reality there will be many more
My thinking:
•Relatively simple array formula to find row number where right(A:A,5)="(JAM)"
•Use these row numbers and either indirect or offset to get the starting cell of the item list
•Use array formula to generate array the exact size of the item list
•Use array formula to get row numbers of instances of worms and beer
•Use index to get intersect of above calculated row and column E.
The closest I've gotten is in cell J8, I've managed to get to get to point three in 'my thinking' but only for the first case, hence the min (I was trying to get it to work for the first instance before I tried it on the whole dataset)."
Please ignore formula length, volatile functions, calculation speeds, and any other of the usual worries of formula construction, I'd just like to know if it's possible!
If there are any questions then please let me know, and if this isn't an appropriate thread then let me know and I'll delete.
Many thanks