Macro to compare cells in a table and populate max value [Closed]

Report
Posts
1
Registration date
Sunday July 2, 2017
Status
Member
Last seen
July 2, 2017
-
Hi all!

Hope you can help me out, :-D

I have a Table in Excel (nicely named Table1) and it's full of data which cannot be sorted or columns in added. I am looking for a macro which will enable me to compare all the values in Column A, next compare values in Column AF and then put the maximum value in the "highest" row, and put a "-" in the others.

So before data (eg):

Column A: Column AF:
2000 400
3000 20000
2000 17000
2000
3000 -

After data:

Column A: Column AF:
2000 17000
3000 20000
2000 -
2000 -
3000 -

THEN, for Phase 2 if I may, :-D. Only replace the data if there's a value entered AND there's less than a 50% difference in the value in Column AF:

Column A: Column AF:
2000 400
3000 20000
2000 17000
2000
3000 -
2000 16500

After data:

Column A: Column AF:
2000 400
3000 20000
2000 17000
2000 -
3000 -
2000 -

But that second one is really optional, the first one is more important.

Hope you understand!

Thanks a million./

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!