Hi all,
I need help with a macro.
In sheet "List" I have a table with data.
In sheet "Pickup data" I have table with standard month range.
I need when the macro will run, a message box to appear asking for the month length that need to be entered.
Based on the entered value, macro will search the closest smaller value in column "E" in sheet "List", based on the standard month value in sheet "Pickup data".
All rows (cells B-H) for which this apply to be copied at the end of the existing data, and instead the existing value in column "E", the newly entered value to be copied.
e.g.: For the month period of 36 in column "E" (NOPR), I have the below value.
MODE CONF CHRS NOPR MAXRESVV MAXRESVP MINRESVP
AAA 2x 300 36 943 0.34 0.02
AAA 2x 500 36 8467 0.8 0.02
AAA 3x 300 36 2922 0.26 0.02
AAA 3x 500 36 3232 0.84 0.02
BBB 1x 300 36 2342 0.58 0.02
BBB 1x 500 36 10037 0.46 0.02
CCC 1x 300 36 2554 0.46 0.02
CCC 1x 500 36 5843 0.82 0.02
CCC 2x 300 36 6495 0.64 0.02
CCC 2x 500 36 7749 0.99 0.02
If the user in the message box insert value of 38, the data that will be copied at the end of the table need to be as shown below.
MODE CONF CHRS NOPR MAXRESVV MAXRESVP MINRESVP
AAA 2x 300 38 943 0.34 0.02
AAA 2x 500 38 8467 0.8 0.02
AAA 3x 300 38 2922 0.26 0.02
AAA 3x 500 38 3232 0.84 0.02
BBB 1x 300 38 2342 0.58 0.02
BBB 1x 500 38 10037 0.46 0.02
CCC 1x 300 38 2554 0.46 0.02
CCC 1x 500 38 5843 0.82 0.02
CCC 2x 300 38 6495 0.64 0.02
CCC 2x 500 38 7749 0.99 0.02
Also, optional, it will be great if more than one value can be entered per time.
Thank you in advance.
Igor
VBA Copy parts of array.xlsb
Bookmarks