Hi All,
I'm new to VBA and I'm working on something for work.
I've attached a sample file in this post.
Basically what I need to do is make the source data on Sheet2 equal to the data in column B on Sheet3. The data in source data is about 70% generally correct however there are some values that are always 1 cent different and on some days at work there may be over 200 values that are just 1 cent off and I have to manually correct these which is tedious.
So I need to write some code that compares (on Sheet3) value A to value B, if value A is greater than value B then round it down 1 cent and copy this new value to the corresponding value in the source data on Sheet2. I need something that also validates the number of values. For example in the source data there are 5 values of $167.65 and there are 5 values of $167.64 in column B, since the number of these values are equal then I can go ahead and round them (because I always round down by 1 cent). However sometimes there may be 6 values of $167.65 in the source data and only 5 values of $167.64, this is when I'll need to do some investigation on why this is different so I would not round this just yet.
Hope this makes sense and someone can point me in the right direction![]()
Bookmarks