looking for a formula in a multiple choice question bank

orinew1324

New Member
Joined
Mar 22, 2020
Messages
6
Office Version
  1. 2013
  2. 2010
Platform
  1. Windows
Hey there!
First things first- I want to thank you for helping me with the matter at hand.
To summarize the issue:
I have an excel file that contains within it a bank of multiple choice questions and it looks somewhat like that:

2.jpg

there are 4 columns for each answer: answer0id, answer1id, answer2id and answer3id.
next to each of these, there are additional rows that indicate if the answers are correct or false.
for example, in the first row , we can see that the correct answer is answerid2 (which is practically answer number 3) since the row next to it shows the number "1", and all the other questions are false since the row next to them shows the number "0".
In order to import this question bank to a website Im building, I want an additional row that would tell me the right answer based on the binary system shown above.
is there any formula that could scan all these lines and provide the correct answer for each line, without having to do it manually?
thanks in advance,
Ori.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Welcome to the MrExcel board!

I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with. It would also make it easier to see exactly what those headings are.

In any case, try something like this.

=INDEX(M$1:Y$1,MATCH(1,P2:AB2,0))

BTW, rows run across the sheet and columns run down the sheet. I think you have your terminology a little confused which in turn can confuse your potential helpers. ;)
 
Upvote 0
Welcome to the MrExcel board!

I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with. It would also make it easier to see exactly what those headings are.

In any case, try something like this.

=INDEX(M$1:Y$1,MATCH(1,P2:AB2,0))

BTW, rows run across the sheet and columns run down the sheet. I think you have your terminology a little confused which in turn can confuse your potential helpers. ;)

it worked !! thanks alot!
and about the rows and columns, thanks for reminder! haha
what a lovely community,
be safe in these troubled times,
Ori.
 
Upvote 0
it worked !! thanks alot!
and about the rows and columns, thanks for reminder! haha
what a lovely community,
be safe in these troubled times,
Ori.
You're welcome. Glad it helped. We try to make this a very friendly forum. (y)

Working from home in an online forum like this is a safe place to be currently! :LOL:
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,535
Members
449,037
Latest member
tmmotairi

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