Lookup question/condition formatting, I think

MistyLogic

Board Regular
Joined
May 8, 2003
Messages
87
(I apologize in advance for the poor insertion of the excel-to-html sections. I can't seem to get the blank cells to show properly (" "=blank))(nevermind, they were only showing up in the preview)

I have a database of, sadly, virus alerts on our network that gets updated daily with new records. It basically looks like this:
Book2
CDEFGH
1DateFilenameVirusNameVirusTypeActionTakenComputer
212/1/20039:46play.exeW32.Klez.H@mmFileLeftaloneinQuarantinePC-MARIA
312/1/20039:46font.scrW32.Klez.H@mmFileLeftaloneinQuarantinePC-MARIA
412/1/20039:46hkcsrlh.exeW32.Swen.A@mmFileLeftaloneinQuarantinePC-MARIA
512/1/20039:46toW32.Klez.H@mmFileLeftaloneinQuarantinePC-MARIA
612/1/20039:46VOLUME.pifW32.Klez.H@mmFileLeftaloneinQuarantinePC-MARIA
712/1/20039:46application.pifW32.Sobig.F@mmFileLeftaloneinQuarantinePC-CARL
812/1/20039:46movie0045.pifW32.Sobig.F@mmFileLeftaloneinQuarantinePC-CARL
Sheet1

On another sheet in the same workbook, I want to create a "matrix" that looks like this:
Book2
BCDEFGHIJKLMNOP
112/1/0312/2/0312/3/0312/4/0312/5/0312/6/0312/7/0312/8/0312/9/0312/10/0312/11/0312/12/0312/13/0312/14/03
2PC-KIP
3PC-MARIA
4PC-TEMP
5PC-CARL
6PC-ROD
7PC-JANE
8PC-ERIC
Sheet2


The red boxes above are manually shown right now. I want to create a formula for conditional formatting that will look up in the database above what days which machines got infected and make that box red in the the "matrix" below. I'm trying to see if certain PC's are getting infecting at the same time, etc. Any help would be most appreciated!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi, I think that a pivot table would be a good option. Are you familiar with them. Conditional formatting of the pivot table should give you exactly what you are looking for.
Book1
ABCDEF
1DateFilenameVirusNameVirusTypeActionTakenComputer
212/1/20039:46play.exeW32.Klez.H@mmFileLeftaloneinQuarantinePC-MARIA
313/1/20039:46font.scrW32.Klez.H@mmFileLeftaloneinQuarantinePC-MARIA
413/1/20039:46hkcsrlh.exeW32.Swen.A@mmFileLeftaloneinQuarantinePC-MARIA
514/1/20039:46toW32.Klez.H@mmFileLeftaloneinQuarantinePC-MARIA
614/1/20039:46VOLUME.pifW32.Klez.H@mmFileLeftaloneinQuarantinePC-MARIA
712/1/20039:46application.pifW32.Sobig.F@mmFileLeftaloneinQuarantinePC-CARL
814/1/20039:46movie0045.pifW32.Sobig.F@mmFileLeftaloneinQuarantinePC-CARL
9
10CountofVirusTypeDate
11Computer12/1/20039:4613/1/20039:4614/1/20039:46GrandTotal
12PC-CARL112
13PC-MARIA1225
14GrandTotal2237
15
16Withconditionalformatting
17CountofVirusTypeDate
18Computer12/1/20039:4613/1/20039:4614/1/20039:46GrandTotal
19PC-CARL112
20PC-MARIA1225
21GrandTotal2237
Sheet1


Does that do it

The conditional formats are simply cell value is >0, with both pattern and font set to red.
 
Upvote 0
Thanks, GorD, for your quick and insightful response! Yes, I am 'familiar 'with Pivot Tables and got it to work quickly with your solution. However, I have two follow up questions:

1. New records will be added to the database every day. Will the Pivot Table automatically incorporate these? They are added to the bottom of the list so I am assuming they will be.

2. The dates are listed with time-of-day, so I get a separate column for each separate time. I'd rather have it shown by whole day, like in my first example. As it stands now, the Pivot Table cannot show the whole timeline (it's too wide). I suppose I could flip the 'COMPUTER' list with the 'DATE' list so the table reads down instead of across.

Any suggestions?
 
Upvote 0
With reagrd to point 1) as it stands you would need to reselect the data range and click refresh to add the new rows. You can get round this by using a dynamic named range. This is done using the insert name define menu, then in the refers to box type a formula using offset and counta. Syntax would be something like

=offset(1st cell,0,0,counta($a:a$),counta($1:$1)).

With regard to point 2), I'll need to think about that - would using another column and a = left(a1,9) be an option to extract only the date? Not sure?
 
Upvote 0

Forum statistics

Threads
1,215,269
Messages
6,123,976
Members
449,138
Latest member
abdahsankhan

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