Can Vba Help With Auto-checking My Spreadsheep?

I

ieagune

I have a very large spreadsheet which contains the "MEMBER NO" column
the services they received at different times and their assigne
"START" & "END DATES" with the company. There could be multipl
entries/rows for each member in the spreadsheet, but the assigned STAR
& END DATE should be the same for every single row relating to tha
member.

This is where I need your help. I need to check that the above is tru
i.e. dates same for all member entries.

I could do a "filter" and manually check them, but this would take
very long time.
Is there any way I can automate this?
Maybe using VBA to write a query that if Member ID is the same, the
Start/End Dates on all corresponding rows should be the sam
too.......else highlight the error or do something?
And how do I write this program.......what would it look like.

Thank you very much for your help
 
B

Bernie Deitrick

ieagune,

Instead of VBA, try a column of formulas. Let's say that Member No is in
column A, Start is in column B, and End is in column C, with actual data
starting in row 2. Sort your data based on column A first, then column B,
and then column C.

In cell D2, enter the formula

=IF(A2=A3,IF(AND(B2=B3,C2=C3),"Good","Bad"),"")

Then copy D2 down column D to match your data, then filter to show the "Bad"
only, and you can see where your data is bad.

HTH,
Bernie
MS Excel MVP
 
I

ieagune

Thanks so much for answer............since this formula seems to b
refering to only 2 rows at once (i.e. IF A2=A3), what will happen if
have about 3 or 4 rows with the same member no (i.e. A2=A3, A4 & A5
will this code still work and check the dates on all 4 rows
 
B

Bernie Deitrick

It does check row by row, so won't flag all mistakes (and it doesn't know
which is good or bad, just shows differences), but you will flag member
numbers where there are differences within a member's data. Use the
Autofilter to show just the member, then show the data in column D for that
member.

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top