BrianGGG
Board Regular
- Joined
- Mar 5, 2016
- Messages
- 62
Hello. I'm failing at using Dynamic Arrays to completely solve my problem.
A brief description: I have a table of items, and I would like to list each letter of the alphabet along with a count of the number of items that start with that letter.
Here is a sample table that I have called "t_foods":
<colgroup><col style="width: 25pxpx"><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]10[/TD]
</tbody>
I have created a list of letters in the alphabet with the following formula:
[TABLE="width: 354"]
<tbody>[TR]
[TD="class: xl63, width: 354"]=CHAR(SEQUENCE(26,1,65))[/TD]
[/TR]
</tbody>[/TABLE]
and I was able to solve my problem using "a traditional formula" with the following:
[TABLE="width: 354"]
<tbody>[TR]
[TD="class: xl65, width: 354"]=SUM(--(LEFT(t_foods[Food])=E2))
Here's an excerpt of what the answer looks like with these two formulas:
<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]3[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]0[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]0[/TD]
</tbody>
[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E2[/TH]
[TD="align: left"]=CHAR(SEQUENCE(26,1,65))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F2[/TH]
[TD="align: left"]=SUM(--(LEFT(t_foods[Food])=E2))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F3[/TH]
[TD="align: left"]=SUM(--(LEFT(t_foods[Food])=E3))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F4[/TH]
[TD="align: left"]=SUM(--(LEFT(t_foods[Food])=E4))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F5[/TH]
[TD="align: left"]=SUM(--(LEFT(t_foods[Food])=E5))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F6[/TH]
[TD="align: left"]=SUM(--(LEFT(t_foods[Food])=E6))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F7[/TH]
[TD="align: left"]=SUM(--(LEFT(t_foods[Food])=E7))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
My problem is...I can't figure out how to use a spilled formula to find the answer. My best attempt is the following formula:
SUM(--(LEFT(t_foods[Food])=E2#))
This only returns an "#N/A" error for me, and I can't seem to get the SUM function to spill under any circumstance. I even desperately tried to use CTRL-SHIFT-ENTER but no luck.
Anyone have any ideas how to use a dynamic array to solve my problem?
Thanks,
BrianGGG
[/TD]
[/TR]
</tbody>[/TABLE]
A brief description: I have a table of items, and I would like to list each letter of the alphabet along with a count of the number of items that start with that letter.
Here is a sample table that I have called "t_foods":
B | |
---|---|
Food | |
Apple | |
Orange | |
Artichoke | |
Banana | |
Cheese | |
*******s | |
Cream | |
Eggs |
<colgroup><col style="width: 25pxpx"><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]10[/TD]
</tbody>
Sheet1
I have created a list of letters in the alphabet with the following formula:
[TABLE="width: 354"]
<tbody>[TR]
[TD="class: xl63, width: 354"]=CHAR(SEQUENCE(26,1,65))[/TD]
[/TR]
</tbody>[/TABLE]
and I was able to solve my problem using "a traditional formula" with the following:
[TABLE="width: 354"]
<tbody>[TR]
[TD="class: xl65, width: 354"]=SUM(--(LEFT(t_foods[Food])=E2))
Here's an excerpt of what the answer looks like with these two formulas:
E | F | |
---|---|---|
Letters | Traditional | |
A | ||
B | ||
C | ||
D | ||
E | ||
F |
<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]3[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]0[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]0[/TD]
</tbody>
Sheet1
[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E2[/TH]
[TD="align: left"]=CHAR(SEQUENCE(26,1,65))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F2[/TH]
[TD="align: left"]=SUM(--(LEFT(t_foods[Food])=E2))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F3[/TH]
[TD="align: left"]=SUM(--(LEFT(t_foods[Food])=E3))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F4[/TH]
[TD="align: left"]=SUM(--(LEFT(t_foods[Food])=E4))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F5[/TH]
[TD="align: left"]=SUM(--(LEFT(t_foods[Food])=E5))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F6[/TH]
[TD="align: left"]=SUM(--(LEFT(t_foods[Food])=E6))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F7[/TH]
[TD="align: left"]=SUM(--(LEFT(t_foods[Food])=E7))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
My problem is...I can't figure out how to use a spilled formula to find the answer. My best attempt is the following formula:
SUM(--(LEFT(t_foods[Food])=E2#))
This only returns an "#N/A" error for me, and I can't seem to get the SUM function to spill under any circumstance. I even desperately tried to use CTRL-SHIFT-ENTER but no luck.
Anyone have any ideas how to use a dynamic array to solve my problem?
Thanks,
BrianGGG
[/TD]
[/TR]
</tbody>[/TABLE]