Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to write a macro that would audit two columns of data for input
errors. A small data set appears below: Code Fee A5569 161 A5569 161 A5569 171 A2168 265 A2168 265 A2168 265 B3389 199 B3389 199 The macro should scan the first column for the same code. For each group of same codes, it should average the corresponding values. If the average value differs from the first value in the group, the macro should highlight the codes and values. For example, the macro would first scan column 1 for the first code in the column - code A5569. It should then average the values corresponding with that code (average of 161, 161, and 171 = 164.33). Because 164.33 differs from 161 or 171, it should highlight code A5569 and the corresponding values 161, 161, and 171. Once finished with that group, it should move to the next and scan code A2168. It should average the values corresponding with that code (average of 265, 265, and 265 = 265). Because that average equals the values, there is no input error and the macro should loop to the next code in the column - B3389 and perform the same process again. I'm stuck on how to analyze the data within a group of same codes and then, once finished, move on to the next group. Thanks for any help that can be provided. -- John Mansfield |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I'm trying to add columns and getting errors | Excel Worksheet Functions | |||
How to print the circles in formatting audit circle invalid data | Excel Worksheet Functions | |||
why does sorting large columns create errors in top selection? | Excel Worksheet Functions | |||
Macro to add data to the bottom of columns | Excel Discussion (Misc queries) | |||
Formulas returning errors when reference columns are deleted | Excel Programming |