Highlight

haleem100

Board Regular
Joined
Jul 29, 2014
Messages
53
I have a excel spreadhseet, where in I have two products namely DCE and RF, which are in Column A, under neath those are some rows, which I need hilighted. But if the row is empty, I dont want it to be filled with a color,
So for example
Row 50 - has the word DCE and under neath it has 4 rows, then one blank and another 4 and so on
After about 100 rows, there is another product RF, and it has the same scenario
I have two spreadhsheet like this, but the 2nd spreadhseet has the same product but in different rows. How can I do that

Any guidance would be appreaciated

Thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Yes I could have a third product also.
There are only three products

Okay, then I have to go back to one of my original questions... with the product name in the same column as some of its data, and given your last example indicate the possibilityof different amounts of data under each product name, and with blanks mixed in with the data (as per your first message) as well as between data and product names, how do I tell which cells have product names in them and which have data? I ask that because your first message made it sound like you only wanted the data colored and not the product names.
 
Upvote 0
Hi Rick,
The product name are in the same column as the data.
If the product name is there, the rest of the columns are empty
For example - if the product name is in A4, there is nothing else on the 4 row from B to Z
The data starts from then A5
The same scenario is for the other two products
Hope this helps
 
Upvote 0
Hi Rick,
The product name are in the same column as the data.
If the product name is there, the rest of the columns are empty
For example - if the product name is in A4, there is nothing else on the 4 row from B to Z
The data starts from then A5
The same scenario is for the other two products
Hope this helps

Okay, I think I have a better picture of what your data looks like. One of these two macros should do what you want depending of if individual blank cells within your data (if any) should be colored or not...

Code:
Sub ColorDataOnly()
  Intersect(Columns("B").SpecialCells(xlConstants).EntireRow, Columns("A:Z")).Interior.ColorIndex = 6
End Sub


Sub ColorDataOnly2()
  Intersect(Columns("B").SpecialCells(xlConstants).EntireRow, Columns("A:Z")).SpecialCells(xlConstants).Interior.ColorIndex = 6
End Sub
 
Upvote 0
Hi Rick
How about the different products. I have different products
I need them different color
I don't see where you mentioned that requirement before and, of course, it changes everything as now I have to find a way to identify each header's group of data (which is complicated by the layout you have described). Some more follow up questions...

1) Can you describe what kind of data (excluding product names) is in Column A?

2) Is there anything common that the product names or their cell's formats contain? For example, is there a common word or phrase in product name cells that is not in Column A data cells or, perhaps, are the headers in bold type whereas the data isn't, or some other distinguishing "feature"?

3) Do you have individually blank cells mixed in with your data and, if so, should they be colored or not?
 
Upvote 0
Hi Rick,
I have 2 more questions
1. I also need the columns to be highlighted if those columns are blank but the corresponding columns has a value
For example if Column K is blank, but the corresponding Column A has data, it needs to be highlighted.
2. If Column A has these words, then that row does not need to be highlighted. The words are SF,FCD and XR

Can these be accommodated.
 
Upvote 0
Hi Rick,
See below
1) Can you describe what kind of data (excluding product names) is in Column A? it is numbers and some words

2) Is there anything common that the product names or their cell's formats contain? For example, is there a common word or phrase in product name cells that is not in Column A data cells or, perhaps, are the headers in bold type whereas the data isn't, or some other distinguishing "feature"? There is nothing common in the product name cells that exist in the data cells
3) Do you have individually blank cells mixed in with your data and, if so, should they be colored or not? If the line is blank, then I do not need it to be colored.

Further to that, the information that I said above
I also need the columns to be highlighted if those columns are blank but the corresponding columns has a value
For example if Column K is blank, but the corresponding Column A has data, it needs to be highlighted.
2. If Column A has these words, then that row does not need to be highlighted. The words are SF,FCD and XR


 
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,146
Members
449,098
Latest member
Doanvanhieu

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