#  Other Applications & Softwares  > Outlook Formatting & Functions >  >  Cell increment based on fill colour

## SecretS

```
Please Login or Register  to view this content.
```


Hi Guys,

Can anyone help with a problem I have. I need to increase a cell count by 1 or 0.5 based on the fill colour of the cell. I am using the following code to increment the count by 1, which works fine,  but i also need to increment the cell count by 0.5 if the cell is a different colour. I am using Excel 2010. Any help would be much appreciated.




```
Please Login or Register  to view this content.
```


Many Thanks

----------


## Richard Buttrey

_Hi and welcome to the forum. Unfortunately your post does not comply with Rule 3 of our Forum_ RULES. *Use code tags around code.* 

Posting code between  [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE]  tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

Click on Edit to open your thread, then highlight your code and click the *#* icon at the top of your post window. More information about these and other tags can be found here

I'll change it for you on this occasion but note for the future.

----------


## Richard Buttrey

...put an Else clause in the IF block

----------


## SecretS

Thank you Richard

 :Smilie:

----------


## SecretS

Hi Richard,
I am an excel novice so could you expand on your comment regarding the "Else clause" please.

Many Thanks

----------

