![]() |
Can Vba Help With Auto-checking My Spreadsheep?
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 -- Message posted from http://www.ExcelForum.com |
Can Vba Help With Auto-checking My Spreadsheep?
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 "ieagune " wrote in message ... I have a very large spreadsheet which contains the "MEMBER NO" column, the services they received at different times and their assigned "START" & "END DATES" with the company. There could be multiple entries/rows for each member in the spreadsheet, but the assigned START & END DATE should be the same for every single row relating to that member. This is where I need your help. I need to check that the above is true i.e. dates same for all member entries. I could do a "filter" and manually check them, but this would take a 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, then Start/End Dates on all corresponding rows should be the same 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. --- Message posted from http://www.ExcelForum.com/ |
Can Vba Help With Auto-checking My Spreadsheep?
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 -- Message posted from http://www.ExcelForum.com |
Can Vba Help With Auto-checking My Spreadsheep?
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 "ieagune " wrote in message ... Thanks so much for answer............since this formula seems to be refering to only 2 rows at once (i.e. IF A2=A3), what will happen if i 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? --- Message posted from http://www.ExcelForum.com/ |
Can Vba Help With Auto-checking My Spreadsheep?
|
All times are GMT +1. The time now is 12:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com