how to add individual value in output column and summation

trustmeasfrnd

New Member
Joined
Oct 19, 2008
Messages
32
hi,
how can i use formula by which when i input above valued it get in output Like for
MH1 in A1 its value 40 under A1 and 32 under A2 and 44 under A3. similarly for MH2 and so on but all Mh1 MH2 are variables.if there is no 2nd or 3rd Value it should show zero in A2 and A3.

i know its very easy but i am not able to do it using formula i am not sure how to vary range if i use index function.



Book1
ABCDEFG
1Col ACol BCOL C
2MH16540
3MH16032
4MH14044
5MH210060
6MH28048
7MH39054
8MH411066
9MH412575
10MH55533
11MH57545
12MH58551
13MH68852.8
14MH76941.4
15MH711267.2
16
17
18OUTPUT
19S. No.A1A2A3Summation
201MH10
212MH20
223MH30
234MH40
245MH50
256MH60
267MH70
27
Sheet4
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
itemvalue1value2helpcol1 list of row numbers
MH165401 2
MH16032 3
MH14044 4
MH2100602 5
MH28048 6
MH390543 7
MH4110664 8
MH412575 9
MH555335 10
MH57545 11
MH58551 12
MH68852.86 13
MH76941.47 14
MH711267.2 15
OUTPUT HELPER TABLE helpcol1increases the counter every time col A changes
S. No.
1MH1234 helper tablethe first 2 got by
2MH256 =OFFSET($D$1,MATCH(SMALL($D$2:$D$15,A20),$D$2:$D$15,0),10)
3MH37
4MH489 the 3 to the right of it got by
5MH5101112 =IF($C21="",IF(C20+1<=MAX($N$2:$N$15),C20+1,""),IF(C20="","",IF(C20+1<$C21,C20+1,"")))
6MH613
7MH71415
second helper table
C2 got by=IF(C20<>"","C"&C20,"")
ie concatenating "C" plus what is in helper table
OUTPUTsecond helper tableOUTPUTfinal desired output
S. No.S. No.
1MH1C2C3C41MH1403244
2MH2C5C6 2MH26048
3MH3C7 3MH354
4MH4C8C9 4MH46675
5MH5C10C11C125MH5334551
6MH6C13 6MH652.8
7MH7C14C15 7MH741.467.2
the 40 obtained by
=IF(C34="","",INDIRECT(C34))

<colgroup><col span="5"><col><col span="3"><col><col span="9"></colgroup><tbody>
</tbody>
 
Upvote 0
thanks oldbrewer,
it worked nicely.i think i have just to change 10 to 1.

=OFFSET($D$1,MATCH(SMALL($D$2:$D$15,A20),$D$2:$D$15,0),10)
for row i used = Row()
but i could not automate Helpcolumn1.i have to put it manually.
can it be done in more compact way?
thank you for the help.
also when i tried to add the output say for MH2 it gives #value . how to solve that.


 
Upvote 0
10 is there to read the column 2......15

itemvalue1value2helpcol1 list of row numbers
MH165401 2
MH16032 3
MH14044 the cell below 1 in helpcol1 is4
MH2100602 =IF(A3<>A2,MAX($D$1:D2)+1,"")5
MH28048 6
MH390543 7

<colgroup><col span="5"><col><col span="3"><col><col span="5"></colgroup><tbody>
</tbody>
 
Upvote 0
hi Oldbrewer,
yeah i also realized that it can be done using above formula.
just a clarification with cells wherever i am using this formula =IF(C34="","",INDIRECT(C34))
can these cells be added algebrically?

thank you.
regards,
Abhisekh
 
Upvote 0

Forum statistics

Threads
1,215,268
Messages
6,123,966
Members
449,137
Latest member
yeti1016

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