Hey guys! I have a serious issue that is driving me insane. Here's the problem:
I have proprietary software that generates an excel spreadsheet every week with sales data. The columns of this spread sheet and some example data are listed below...
B18 C18 D18 E18 F18 G18 H18 I18 J18 K18 L18 M18 N18 O18 P18 Q18 R18 S18 T18 U18
<colgroup><col span="6" width="130"><col span="3" width="130"><col width="130"><col width="130"><col width="130"><col width="130"><col span="2" width="130"><col span="5" width="130"></colgroup><tbody>
</tbody>
<colgroup><col style="mso-width-source:userset;mso-width-alt:4754; width:98pt" span="6" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754; width:98pt" span="3" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754;width:98pt" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754;width:98pt" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754;width:98pt" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754;width:98pt" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754; width:98pt" span="2" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754; width:98pt" span="5" width="130"> </colgroup><tbody>
</tbody>
In order to calculate commissions based on the data from the first spreadsheet, I have another workbook that has tabs for each buyer. That spreadsheet looks like this...
B133 C133 D133 E133 F133 G133 H133 I133 J133 K133 L133 M133
<colgroup><col width="239"><col width="87"><col width="211"><col width="111"><col width="111"><col span="2" width="111"><col width="117"><col width="113"><col width="102"><col width="171"><col width="102"></colgroup><tbody>
</tbody>
<colgroup><col style="mso-width-source:userset;mso-width-alt:8740;width:179pt" width="239"> <col style="mso-width-source:userset;mso-width-alt:3181;width:65pt" width="87"> <col style="mso-width-source:userset;mso-width-alt:7716;width:158pt" width="211"> <col style="mso-width-source:userset;mso-width-alt:4059;width:83pt" width="111"> <col style="mso-width-source:userset;mso-width-alt:4059;width:83pt" width="111"> <col style="mso-width-source:userset;mso-width-alt:4059; width:83pt" span="2" width="111"> <col style="mso-width-source:userset;mso-width-alt:4278;width:88pt" width="117"> <col style="mso-width-source:userset;mso-width-alt:4132;width:85pt" width="113"> <col style="mso-width-source:userset;mso-width-alt:3730;width:77pt" width="102"> <col style="mso-width-source:userset;mso-width-alt:6253;width:128pt" width="171"> <col style="mso-width-source:userset;mso-width-alt:3730;width:77pt" width="102"> </colgroup><tbody>
</tbody>
Obviously these two spreadsheets are not formatted the same as far as columns go, and only certain data points need to be transferred over.
I want to a VBA function that will let me automatically populate the second spreadsheet with the click of a button (active x control or something).
I can't use VLOOKUP because the data changes every week (no unique values) and a single buyer can have up to 10 purchased vehicles. I can't use INDEX & MATCH because of the same reason... the spread sheet changes every week (the data, not the format).
So if "Bryan Miller" purchased 8 vehicles, I want all the vehicles that he purchased to transfer from the 1st spreadsheet to the 2nd.
Here's how the data needs to match up based on the columns and rows used as an example above (end result of the second spread sheet):
B133 C133 D133 E133 F133 G133 H133 I133 J133 K133 L133 M133
BLANK B18 E18 M18 N18 LEAVE LEAVE O18 P18 Q18 LEAVE F18
CAN ANYONE HELP ME?
I have proprietary software that generates an excel spreadsheet every week with sales data. The columns of this spread sheet and some example data are listed below...
B18 C18 D18 E18 F18 G18 H18 I18 J18 K18 L18 M18 N18 O18 P18 Q18 R18 S18 T18 U18
STK # | Buyer Full | Caller Name | Car Description Short | Mini Deal | Doesn't count in 8 | Date Purchased | Balance Paid Date | Date Sold | How Sold | Title Received Date | Price Purchased | Total Haul Cost | Parts Total Price | Price Sold | Gross Margin | Gross Margin-Haul | Gross Margin-Haul & Parts | Gross Margin-Haul & Parts(600) | Gross Margin-Haul & Parts(750) |
<colgroup><col span="6" width="130"><col span="3" width="130"><col width="130"><col width="130"><col width="130"><col width="130"><col span="2" width="130"><col span="5" width="130"></colgroup><tbody>
</tbody>
<colgroup><col style="mso-width-source:userset;mso-width-alt:4754; width:98pt" span="6" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754; width:98pt" span="3" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754;width:98pt" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754;width:98pt" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754;width:98pt" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754;width:98pt" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754; width:98pt" span="2" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754; width:98pt" span="5" width="130"> </colgroup><tbody> </tbody> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<colgroup><col style="mso-width-source:userset;mso-width-alt:4754; width:98pt" span="6" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754; width:98pt" span="3" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754;width:98pt" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754;width:98pt" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754;width:98pt" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754;width:98pt" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754; width:98pt" span="2" width="130"> <col style="mso-width-source:userset;mso-width-alt:4754; width:98pt" span="5" width="130"> </colgroup><tbody>
</tbody>
In order to calculate commissions based on the data from the first spreadsheet, I have another workbook that has tabs for each buyer. That spreadsheet looks like this...
B133 C133 D133 E133 F133 G133 H133 I133 J133 K133 L133 M133
Bryan Miller | Stock # | Description | Cost | Haul | Sale Fee | Pac | Repairs | Sold $ | Profit | Draft (1=yes/0=no) | Mini Deal |
<colgroup><col width="239"><col width="87"><col width="211"><col width="111"><col width="111"><col span="2" width="111"><col width="117"><col width="113"><col width="102"><col width="171"><col width="102"></colgroup><tbody>
</tbody>
$ 200.00 | $ 550.00 | $ - | |||||||||
$ 200.00 | $ 550.00 | $ - | |||||||||
$ 200.00 | $ 550.00 | $ - | |||||||||
$ 200.00 | $ 550.00 | $ - | |||||||||
$ 200.00 | $ 550.00 | $ - | |||||||||
$ 200.00 | $ 550.00 | $ - | |||||||||
$ 200.00 | $ 550.00 | $ - | |||||||||
$ 200.00 | $ 550.00 | $ - | |||||||||
$ 200.00 | $ 550.00 | $ - | |||||||||
$ 200.00 | $ 550.00 | $ - |
<colgroup><col style="mso-width-source:userset;mso-width-alt:8740;width:179pt" width="239"> <col style="mso-width-source:userset;mso-width-alt:3181;width:65pt" width="87"> <col style="mso-width-source:userset;mso-width-alt:7716;width:158pt" width="211"> <col style="mso-width-source:userset;mso-width-alt:4059;width:83pt" width="111"> <col style="mso-width-source:userset;mso-width-alt:4059;width:83pt" width="111"> <col style="mso-width-source:userset;mso-width-alt:4059; width:83pt" span="2" width="111"> <col style="mso-width-source:userset;mso-width-alt:4278;width:88pt" width="117"> <col style="mso-width-source:userset;mso-width-alt:4132;width:85pt" width="113"> <col style="mso-width-source:userset;mso-width-alt:3730;width:77pt" width="102"> <col style="mso-width-source:userset;mso-width-alt:6253;width:128pt" width="171"> <col style="mso-width-source:userset;mso-width-alt:3730;width:77pt" width="102"> </colgroup><tbody>
</tbody>
Obviously these two spreadsheets are not formatted the same as far as columns go, and only certain data points need to be transferred over.
I want to a VBA function that will let me automatically populate the second spreadsheet with the click of a button (active x control or something).
I can't use VLOOKUP because the data changes every week (no unique values) and a single buyer can have up to 10 purchased vehicles. I can't use INDEX & MATCH because of the same reason... the spread sheet changes every week (the data, not the format).
So if "Bryan Miller" purchased 8 vehicles, I want all the vehicles that he purchased to transfer from the 1st spreadsheet to the 2nd.
Here's how the data needs to match up based on the columns and rows used as an example above (end result of the second spread sheet):
B133 C133 D133 E133 F133 G133 H133 I133 J133 K133 L133 M133
BLANK B18 E18 M18 N18 LEAVE LEAVE O18 P18 Q18 LEAVE F18
CAN ANYONE HELP ME?