Hi, I am trying to automatically sort a column in excel using VBA.
I want the closest value to my answer (my answer is found in sheet 2 but its hidden) to appear at the top of the sorted list. (The answer will be in a separate sheet, say sheet2, but my list will be in sheet1)
for example, my answer is 4,000 and the closest answer is 3,998. I want the row where the answer is 3,998 to be shifted to the top of the list and likewise sort for all the other rows. So the whole list will be sorted based on which ones are the closest to the answer.
This is the sorting code I found online, but idk how to include the part where I can sort according to my answer in another cell. Is that even possible?
Bookmarks