Forum Discussion
Define a range based on the data in a spreadsheet
I'm afraid I need a little more help. I get that CNTL-T defines & formats a table. I've been doing that. But your link to "structured references" doesn't work for me. I did find some info in Excel's Help function, but I'm still confused.
Here's the formula I am using: "=SUMIF($AP$2:$AP54513,"TRUE",$AI$2:$AI54513)" where the values in column AP are either "TRUE" or "FALSE", and if it is "TRUE", I add the value in column AI to the total. The end value of the table, 54513, is hard coded. The values in Row 1 are headers. So, if column AP has the header "GoAdd" and column AI's header is "Sales", how do I use structured references?
I can see how I can start entering a simple formula in a cell and then just click on another cell to get a structured reference to the clicked-upon cell, but how do I use a structured reference to a column, and specifically, how do I replace the SUMIF formula listed above?
Finally, how can I capture the number of rows in a table?
Thank you for your help.
- Detlef_LewinMay 14, 2018Silver Contributor
Strange that the link does not work anymore.
Try again:
Just build the formula and Excel will insert the structured references instead of the usual cell references.
- Jon CohenMay 15, 2018Copper Contributor
Okay, success!
The second linked worked.
I had to do a few things manually -- I went to "Formulas -- Name Manager" to rename the table. When replacing the original formula...
=SUMIF($AP$2:$AP54513,"TRUE",$AI$2:$AI54513)
I had to enter the structured references manually. Given the setup in my previous reply, I changed the formula to ...
=SUMIF(My_Table[GoAdd],"TRUE", My_Table[Sales])
It's less important for me to know how many rows there are in My_Table -- I can easily find that the hard way (CNTL-Down Arrow).
Thanks for your help.