Hi,
Use the following logic
just store in another excel(just name the 1st row headers as No, A, B, C and D respectively-one time)
get the first row details from excel u have
for example 1 a means
so just add 1 to the 2nd column(A) of 1st Question
No A B C D
1 1
get 2nd row from ur excel
For ex 4 b means
so just add 1 to the 3rd column(B) of 4th Question
No A B C D
4 1
get 3rd row from ur excel
For ex 1 b means
so just add 1 to the 3rd column(B) of 1st Question
No A B C D
1 1 1
get 4th row from ur excel
For ex 1 b means
so just add 1 to the 3rd column(B) of 1st Question
No A B C D
1 1 2
likewise get all rows from ur excel and add values
finally the excel will look like following
No A B C D
1 1 2 2 0
2 2 2 0 0
3 1 1 2 1
Get total for each
No A B C D tot
1 1 2 2 0 5
2 2 2 0 0 4
3 1 1 2 1 5
Result
No A B C D tot A% B% C% D%
1 1 2 2 0 5 1/5*100 2/5*100 2/5*100 0
2 2 2 0 0 4 2/4*100 2/4*100 0 0
3 1 1 2 1 5
Note: if value is zero means dont divide. otherwise u will get zero divide exception
I hope u know how to access values from excel
Use the following logic
just store in another excel(just name the 1st row headers as No, A, B, C and D respectively-one time)
get the first row details from excel u have
for example 1 a means
so just add 1 to the 2nd column(A) of 1st Question
No A B C D
1 1
get 2nd row from ur excel
For ex 4 b means
so just add 1 to the 3rd column(B) of 4th Question
No A B C D
4 1
get 3rd row from ur excel
For ex 1 b means
so just add 1 to the 3rd column(B) of 1st Question
No A B C D
1 1 1
get 4th row from ur excel
For ex 1 b means
so just add 1 to the 3rd column(B) of 1st Question
No A B C D
1 1 2
likewise get all rows from ur excel and add values
finally the excel will look like following
No A B C D
1 1 2 2 0
2 2 2 0 0
3 1 1 2 1
Get total for each
No A B C D tot
1 1 2 2 0 5
2 2 2 0 0 4
3 1 1 2 1 5
Result
No A B C D tot A% B% C% D%
1 1 2 2 0 5 1/5*100 2/5*100 2/5*100 0
2 2 2 0 0 4 2/4*100 2/4*100 0 0
3 1 1 2 1 5
Note: if value is zero means dont divide. otherwise u will get zero divide exception
I hope u know how to access values from excel