I was given some guidance the other day with the sumproduct function. The below formula says tell me how many time 4 and 10 are in the same row in the data range i have specified.
=SUMPRODUCT(--(COUNTIF(OFFSET(B2:D2,ROW(B2:D4)-ROW(B2:D2),0),4)>0),--(COUNTIF(OFFSET(B2:D2,ROW(B2:D4)-ROW(B2:D2),0),10)>0))
Is there a way either through conditional formatting or another method were i can highlight the row if the formula applies which will make it easier to look over the data if there is a large amount of data? I have provided a screen shot to try and simulate what i am trying to acheive. (i have manually highlighted the counted rows)
thanks
One way:
Select entire range starting and go to Format|Conditional Formatting
Select Formula Is from 1st drop down and enter formula:
=AND(ISNUMBER(MATCH(4,$B2:$D2,0)),ISNUMBER(MATCH(10,$B2:$D2,0)))
where B2:D2 is the top most row range in your entire selection
Click Format and choose your colour pattern.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
If you selected all the rows and applied that formula I gave you as suggested, then it will highlight all rows that fall into those conditions...
alternatively, you can now copy B2:D2 and then select the rest of the rows... and go to Edit|Paste Special and select Formats... it will copy the formatting over.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks