robertwp7472
New member
Hello, I have used this forum before with great success and thanks goes out to all that helped , especially NoS.
I am working on a new project and I am a Novice at writing VBA. I can kind of read it due to previous Visual Basic experience but I am still learning to write it.
For this project I utilized the Macro Recorder for a chunk of it and I borrowed code from my previous project and adapted it to the best of my ability. What I need is for the code to be looked at since the Macro Recorder uses inefficient Code and get some help cleaning it up and debugging. Also, I have a SUB that retrieves data from another file. It works but it opens in a second tab and I need it to transfer the data to the first tab instead and at Row 2 instead of Row 1 because I have command buttons in Row 1.
Note: This file is a daily upload from SAP and is of random length depending upon how many orders we have so any code written or rewritten needs to account for this. (Please see attachments)
View attachment Best Door.xlsmView attachment Allocation Query.xlsx
For the colorizing....
If the above runs completely then there will be a Column named "Isle" that has data like "AA, AY, PG, BD, etc." What I'd like to have happen is the entire row be colorized using a five color range of Light Pink, Light Blue, Light Green, Light Yellow, & Light Grey depended upon the value of Column "Isle"
If the value is between (AA:AK) then Pink, (AL:AY) Blue, (BA:BF) Green, (BG:BT) Yellow, (CA:CE) grey, & (PAM) no color
I also need a function run that I can't figure out in VBA. One of the Columns is named "Slot" and it has numerical data in it. What I need is for this to work: IF value of "Slot" < 63 Then K="North" Else K="South"
The final function will be to sort the form by Column A "Order Number"
Any help provided will be greatly appreciated. Thanks
I am working on a new project and I am a Novice at writing VBA. I can kind of read it due to previous Visual Basic experience but I am still learning to write it.
For this project I utilized the Macro Recorder for a chunk of it and I borrowed code from my previous project and adapted it to the best of my ability. What I need is for the code to be looked at since the Macro Recorder uses inefficient Code and get some help cleaning it up and debugging. Also, I have a SUB that retrieves data from another file. It works but it opens in a second tab and I need it to transfer the data to the first tab instead and at Row 2 instead of Row 1 because I have command buttons in Row 1.
Note: This file is a daily upload from SAP and is of random length depending upon how many orders we have so any code written or rewritten needs to account for this. (Please see attachments)
View attachment Best Door.xlsmView attachment Allocation Query.xlsx
For the colorizing....
If the above runs completely then there will be a Column named "Isle" that has data like "AA, AY, PG, BD, etc." What I'd like to have happen is the entire row be colorized using a five color range of Light Pink, Light Blue, Light Green, Light Yellow, & Light Grey depended upon the value of Column "Isle"
If the value is between (AA:AK) then Pink, (AL:AY) Blue, (BA:BF) Green, (BG:BT) Yellow, (CA:CE) grey, & (PAM) no color
I also need a function run that I can't figure out in VBA. One of the Columns is named "Slot" and it has numerical data in it. What I need is for this to work: IF value of "Slot" < 63 Then K="North" Else K="South"
The final function will be to sort the form by Column A "Order Number"
Any help provided will be greatly appreciated. Thanks