I'm new to VBA and I'm trying to select a range and format all of the cells in the range differently based on the cell contents. Basically if the cell is a link to another workbook then change font to red, if the cell is a link to another sheet (same workbook) then format as green, if a formula in the same sheet then font should be blue, if it's a manual input format as black.
If cell.formula contains a "]" and a "!", then
cell.font.color=255
else
If Cell.Formula contains a "!" but not a "]", then
cell.font.color=34310
else
If Cell.Formula contains a "=" but not a "]" or a "!", then
cell.font.color=16711680
Else
Cell.font.color=0
If cell.formula contains a "]" and a "!", then
cell.font.color=255
else
If Cell.Formula contains a "!" but not a "]", then
cell.font.color=34310
else
If Cell.Formula contains a "=" but not a "]" or a "!", then
cell.font.color=16711680
Else
Cell.font.color=0