Trying to make a baseball lineup

VinceS

New Member
Joined
Aug 12, 2018
Messages
2
I'm no expert on Excel. Most of what I do is from watching youtube videos. Right now, I'm working on a baseball lineup program for a sim game that I play.

At this point, I have created "lists" of teams. With a macro, I install the team. Keep in mind that there are 9 cells available for players. When I run a team macro, each of those 9 boxes will have a drop down menu in which I can choose which player I want in that spot of the order. What I want to do is click on the name and have that name highlighted when I click on the cell.

I created this formula for the Conditional Formatting: =CELL("address")=CELL("address",$A2), The range is $A$2:$A$10. That seems to work fine. However, what I noticed is that when I clear the team and put another in, the formula in the Conditional Formatting is gone and the cells no longer highlight. I'm not sure if I need to do something in VBA or with macro.

Ultimately, I want to click on the player, have the name highlighted, then have an associated picture of the player appear.

However, right now, I need help on how to keep the formatting from disappearing on me when I clear teams and reimport a new team. Thanks.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi Vince welcome to the forum. It will be because of the way you 'clear the team' in your macro. Use something like:

Code:
    Range("D4:D12").Select
    Selection.ClearContents
where D4:D12 is your list. This will remove the cuttent contents, but keep all formatting, including the conditional formats.
 
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,842
Members
449,471
Latest member
lachbee

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