Color shading vba

Closed
carman - Jun 27, 2010 at 09:16 PM
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
- Jun 29, 2010 at 03:16 AM
Hello,
Please does anyone know if there is a VBA code that can help me to perform this:
If a phase starts with M then look up column 4 and 5 in document 2 and fill the value in the tab with yellow shading.
If a phase starts wirth S then look up column 3 4 5 in document 2 and fill the value in the tab with yellow shading.
Thanks!

1 reply

rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
769
Jun 28, 2010 at 05:05 AM
If all you care is that if a phrase starts with M or S, then you can use VLOOKUP and do a conditional formatting to color the cell



Some thing like this

=IF(LEFT(a1,1)="S", VLOOKUP(.....), IF(LEFT(A1,1)="S"), VLOOKUP(...), ""))

Could you please upload a sample EXCEL file WITH sample data, macro, formula , conditional formatting etc on some shared site like https://authentification.site , http://docs.google.com, http://wikisend.com/ , http://www.editgrid.com etc and post back here the link to allow better understanding of how it is now and how you foresee. Based on the sample book, could you re-explain your problem too
0
thanks for your reply.
But what if i am trying to input data from other document. I tried using "=IF(LEFT(a1,1)="S", VLOOKUP(.....), IF(LEFT(A1,1)="S"), VLOOKUP(...), "")) " by conditional formatting but i showed a message : "you may not use conditional formatting from other worksheet or other workbook".
Since i am looking up data from other document, how could this be solved??Thanks again.
0
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
769
Jun 29, 2010 at 03:16 AM
Could you please upload a sample EXCEL file WITH sample data, macro, formula , conditional formatting etc on some shared site like https://authentification.site , http://docs.google.com, http://wikisend.com/ , http://www.editgrid.com etc and post back here the link to allow better understanding of how it is now and how you foresee. Based on the sample book, could you re-explain your problem too
0