I can has Excel help plz?

  • Thread starter Thread starter Duke
  • 5 comments
  • 637 views

Duke

Keep 'em separated
Staff Emeritus
Messages
24,344
United States
Midlantic Area
Messages
GTP_Duke
Hi, Excel gurus. I'm not bad with this shiny device, but I'm kind of stumped on a problem. None of the functions I can find seem to work correctly (or at all) for what I'm trying to do.

I have data sets of varying (and unknown/changing) length. I am trying to SUM the individual cells in a list of numbers that correspond to specific tags listed in another cell in the same row. Due to the layout of the form I'm making, the data are not in an uninterrupted list, and they can't be sorted.

So I have a list of tags in one column at the left (room names) and a list of data (floor area) in another column a few columns to the right.

What I need is a formula that will calculate and return the combined total floor area of all the rooms with a given name.

Normally I would use one of the lookup functions to return the value for the given name, but A) the data is not properly sorted as required by VLOOKUP, and B) I can't figure out how to get that to sum ALL the numbers that correspond to the target - it just returns the first value that matches, not all of them.

To make matters worse, the data set can vary significantly in length, and I'm trying to make this as user-friendly as possible, so I'd like to avoid functions that require a specified range/array of cells, unless I can use whole column references like B:B.

I've got several clunky ways around the problem, but all require either readjusting the sheet after the data is in, or setting an infinite column of hidden formulae to compile the data. Neither method is particularly friendly to the "set and forget" product I'd really like to have.

Thanks in advance - I hope somebody can help.

[EDIT]

I should add that the ultimate goal is to be able to pluck subtotal out of a varying-length form, to add up for a grand total. However, because of the intended use, I really want to avoid pivot tables and having to array the data in a particular format just so Excel can see it.
 
Last edited:
Hopefully I understood your quandary correctly.

Attached is a small Excell file with what I think is similar to yours with a possible solution.

If you enter *office* (with the asterisks) into cell A13, it will filter out the Conf. Room and Stair and give you a total of 146 (50+48+48). Similar results for entering *stair*, etc.

Edit: I also received a warning when I saved it that there might be some compatibility issues with back saving it from Excel '07 to '03.
 
Thank you for the prompt turnaround. Actually, I just got a SUMIF function to work properly - I must have made an error in it before. It was returning errors, or null.

Thanks again!
 
heh...

1337 geeks in this thread me thinks :-)

OT.. Never used SUMIF or COUNTIF, but they look like quite a weapon, to quote GG - Thanks !..
 
I tried using SUMIF this morning, but I must have made a formula entry error, because it was not working. When I corrected the error, it came on brilliantly. Thanks, everybody.
 

Latest Posts

Back