VBA code to get a value from 2 matching cell filled with color

Benson08

New Member
Joined
Oct 27, 2012
Messages
7
hello, i dont know much about VBA coding but if anyone is willing to help, i run a predictions league and i would like to be able to make a code so if the home teams scores 1st and the person who predicted the result put the home team to score 1st too, i get a value of 2 points, if the results arent the same, they get 0 points.

A3 = Home Team
B3 = Actual Home Score
C3 = "Versus"
D3 = Actual Away Score
E3 = Away Team
G3 = Predicted Home Score
H3= "Versus"
I3 = Predicted Away Score


Which ever team scores 1st in the game I highlight The actual home score or away score to yellow, mean while 1 of the predicted scores is in yellow

so if a3 = g3 are highlighted in interior fill yellow then vaule = 2 ??? thanks for any help
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi,
To make things easier I suggest you change your setup, using column F to enter the actual first scorer (H or A) and column J for the first scorer prediction.

Then you can use a very simple formula
=IF(F3=J3,2,0)

Dealing with colors is always a mess.

M.
 
Upvote 0
Yep, thats what i got, just thought it might of been possible to do and yes it is messing to try do lol
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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