VBA Command Example.xlsb
Hello
I’m in some need regarding a command with the intention being to lookup, find and in turn match figures in three columns according to a set scale and then copy the corresponding cells to a different tab.
I have tried and so far, ultimately failed to get my head around this, so any assistance given is appreciated.
A full rundown of what is required is attached and below.
Within Tab 1, what is required is detail from columns K, O and P to be automatically transposed into their corresponding columns on Tab 2 in line with Column C on Tab 1 and 2.
The manner of this command is dependent on an existing scale (Very High, High, Moderate, Low, Very Low) and must be processed in order of;
1. Very High
2. High
3. Moderate
4. Low
5. Very Low
The command needs to look along column J in order of the scale above and copy the corresponding values from K, O and P into the cells on Tab 2.
There could be an instance whereby a figure has appeared twice (1 and 2) in the set priority scale such as;
Column J Column K
1 High A13
2 High A13
3 High A21
In this instance, the first instance of A13 (1) would be copied across and the second copied cell would be A21 (3) as it is the next best match in line with the priority scale that is not a duplicate
Column J Column K
1 High A13
2 High A13
3 High A21
I.e. if Column J matches, copy detail from Column K into Tab 2 and move onto next row in line with set scale. If column J doesn’t match then move onto next row in line with set scale
The command would then work down through the set scale (Very High, High, Moderate, Low, Very Low) until all entries are complete and copied over into the corresponding cells on Tab 2.
An example output is on the attached sheet and coloured in yellow on Tab 2. If this needs a trigger button to run the command, I am comfortable with that.
Many thanks for reading, any assistance will be very much appreciated.