![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
Two columns, like this
Name Data RET79 534536 5345353234 98981 TJH 534530 424204240 242420 etc. Now, I want to set something up so that if someone types RET79 in Cell D1 that Cell E1 will return the sum of the data for RET79. Have played with sumif array forumlas but not manager to do it yet, can you help? many thanks, RET79 |
|
|
|
|
|
#2 | |
|
Board Regular
Join Date: Feb 2002
Location: North Alabama, USA
Posts: 105
|
Quote:
__________________
Hope this helps! Rocky <h6>"Be not the first by whom the New are try'd, Nor yet the last to lay the Old aside." Alexander Pope (1688-1744).</h6> |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
Rocky,
Many thanks for your solution, I have never seen one quite like that. However, and this is probably my fault, but, this will only work given that the labels fill the cells in col A. EG A2=RET79, A7 = ROCKY Data from B2 to B12. So, if user types ROCKY in D1, then, E1 will return SUM(B7:B12) in effect. With your soultion it only returns Sum(B7) I'm sorry, I should have tried to get a HTML table so you could see it clearer. RET79 |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
Ret:
Can't you just drag & fill the names beside the data so that Rocky's great solution will work ? Do it that way will give you more options in the future as well i.e. PVT's etc.
__________________
<MARQUEE>...........Never be afraid to try something new. Remember, amateurs built the ark, professionals built the Titanic...............The easiest thing to find is fault, don't be easy !.. --Anonymous--...</marquee> |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
Nimrod,
Yes, I'm aware that doing that would work, however, due to various reasons the table structure has to be that way and filling in the labels will not be acceptable for the users of my spreadsheets. I agree, it is a great solution and I have just realised I have been using many unecessary array formulas in the past. RET79 |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
I am not either a fan of using columns to make intermediate calculations and then hiding the columns, I am seeking an elegant solution, have tried hard myself but not succeeded.
RET79 |
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
But if I don't get another solution then I think I will use an intermediate column with all the labels filled in then I can use Rocky's elegant solution.
RET79 |
|
|
|
|
|
#8 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
Here's a solution if you willing to hide a column.
IF colA = Names ColB = Hidden Column ColC = Numbers D2 = where you will enter Name to sum D1 = Place sum Forumla --ColB ( the hidden column) Assuming starting data in A2: Place this formula in B2 and drag down column =IF(ISBLANK(A2),B1,A2) (then hide colmn) D1 = =SUMIF(B:B,D2,C:C) D2 = enter criteria i.e. persons name note( hidden column can be anywhere on sheet)..change formula accordingly |
|
|
|
|
|
#9 |
|
Board Regular
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
Nimrod,
Great solution and I will tuck that hidden column away somewhere away from the calcs, great idea, thankyou. RET79 |
|
|
|
|
|
#10 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
Cool Dude:
May I suggest that you not only hide it but use format-- Protection to hide and protect the formulas... Anyway glad you happy ...cheers
__________________
<MARQUEE>...........Never be afraid to try something new. Remember, amateurs built the ark, professionals built the Titanic...............The easiest thing to find is fault, don't be easy !.. --Anonymous--...</marquee> |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|