Need help with "if" formula

New Contributor

Hello everyone,


Newer to Excel, so bare with me!


In the attached file, I'm trying to assign certain data into specific locations.


The way it works, is that I receive a separate excel file that has the following data that you see on the bottom right corner of the screen, where it shows "Route code" and "Depart Time" (columns AK and AL). And what I need to do is assign certain Route Codes into the colored boxes according to their wave times.


What I'd like to do is be able to paste the data for Route Codes and Depart Times into this sheet, and have the colored boxes automatically fill with the XL numbers corresponding to their depart times. The problem is that each XL # will have a different depart time each day. But how can I get all of the orange boxes to automatically fill in the XL#s for wave 1, the blue boxes for wave 2, and the pink boxes for wave 3? The order doesn't matter, as long as all the XLs for each wave are in their respective boxes.

3 Replies


You may apply conditional formatting rules as


@Sergei Baklan 

Let me clarify..
This is how I'd like the end product to look like given the data in the example.


- remove background color for all such cells (no fill)

- apply conditional formatting as here to any of them


- copy/paste formatting using Format Painter on other cells (I did only for 4 of them)