Formula help needed (please)

bionicle

Board Regular
Joined
Apr 23, 2009
Messages
186
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Once again I turn to those with a superior mind to mine (not that hard to be honest :) ), I've tried index match, Vlookup & SumProduct with no luck.

Need some assistance with a formula, what I'm trying to achieve is:
total number of hours based on a dropdown box however the hours need only are based on a code for each row.

the drop down has 4No headings
the hours columns total 3No and the code is 1No column.
therefore if heading one in cell J1 reads need ten i get a return of the column D based on the letter reference in column C (this action is needed for 3No of the headings the other heading requires a total of all three columns.
hope this makes sense.

example:

If J1 reads "Even Nicer" the result in column H for row 1 code A would be 0 where if J1 read "Need" it would read 8
the codes in Column C would be in random order thus the need for column H to take into account the code reference.
The 3No heading plus an "All"

Dropdown J1
CodeNeedNiceEven NicerHoursEven Nicer
A800
B800
C0.51
E0.80
F0.30
G0.32
H001
I000
J010
K02.8
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi,
Your explanation is not clear at all :)

Which Column Letter corresponds to your set-up ???
 
Upvote 0
Just read it back to myself and can only agree with you...
on the chart above; column "8" (column H) has a dropdown in the first row "H1" with the list built with four headings Need, Nice, Even Nicer, All.
in column 6 (Column F) lets say F1 I need a formula that references cell "H1" (the dropdown) and returns the hours based on the column headings in column "B, C & D or all three if "All" is selected. I also need it to reference the code used if I input the value "G" say in column "E1" Cell F1 Would read 2, if I changed the dropdown to all Cell F1 would be 2.3

Hope this makes more sense
 
Upvote 0
OK ...
Basically, there are two inputs :
1. Cell H1 for Need, Nice, Even Nicer, All
2. Cell E2 for A,B, C, etc ...
Formula to be tested for cell F2:
Excel Formula:
=IF(E2="",SUM(OFFSET($A$2:$A$11,0,MATCH($H$1,{"Need";"Nice";"Even Nicer"},0))),IF(H1="All",SUMPRODUCT(($B$2:$D$11)*($A$2:$A$11=E2)),SUMPRODUCT((OFFSET($A$2:$A$11,0,(MATCH($H$1,{"Need";"Nice";"Even Nicer"},0))))*($A$2:$A$11=E2))))
 
Upvote 0
Good to hear you got the solution.
If you would like to post the solution then it is perfectly fine to mark your post as the solution to help future readers. Otherwise, please do not mark a post that doesn't contain a solution.
 
Upvote 0
I looked at it in a different way, and used the following:

=SUMPRODUCT(O77:R77*--($O$6:$R$6=$N$2))
Instead of using code column I simplified the solution by just looking at the times produced by the formula I already had in place.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top