I know how to use Select..case statements in VBA but i dont know how i can write this into a function so that on any given cell, i can use it to calculate a bunch of scenarios
In cell E1 to E...whatever the end is, i would like to display the points however theres loads of scenarios for points, so im looking to use a select...case function to determine this and plug in all the scenarios
I know how to write select...case code in VBA, but i dont know how to do this as a function that can be used in a bunch of cells
I'm not sure I follow what you want but if you want the points for each game shown in column E for the Red team and column F for the Blue team, then
Column E : '=IF(B1>C1,3,IF(B1 < C1,0,1))
<c1,0,1))
<c1,0,1))
<c1,0,1))
<c1,0,1))
And a similar formula in column F, or alternatively : =IF(E1=1,1,3-E1)
If instead you want a UDF using Select Case, the syntax would be the same as for a macro.</c1,0,1))></c1,0,1))></c1,0,1))></c1,0,1))
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.