Hi All,
I am struggling to get VBA scripts for the following 4 requirement, your assistance would be greatly appreciated
I have 2 workbooks "Deal_Loader1" and "Promo_Loader", PFA.
i) Script to Enter Input box value as "Deal_Loader1" to auto copy all the Columns in to "Promo_Loader" Workbook under Deal Sheet Columns C:F
ii) Script to Enter Input box value as CRNumber (C12345) in Column B of "Promo_Loader" Deal Sheet same value should be populated until end of the row.
CRNumber will be different for the future entries so when I copy next time the additional entries will be from Deal_Loader2 and those entries should be auto copied same with Input Box value for Deal_Loader2 from last empty row in Columns C:F and For Column B it should be from B12 until end of the row.
iii) Script to auto populate Sql Sheet for the rest of the entries until end of the last row from Deal sheet(A11:E11) based on formulas that we have in column A2:E2 and also for the future entries from Deal_Loader2, entries can be more but I should be able to manage until end of the row every time.
iv) Finally script for Sql: Input Box value as CRNumber to select column D:E entries of all the rows and copy them in to a New OR Existing Notepad file.
Deal G Formula:
=VLOOKUP(D2;Ref_data!A:B;2;FALSE)
Sql A Column Formula: =Deal!A2 Formula is similar on B and C columns
Sql D Column Formula: ="Delete from x_deal where deal_id ='"&C2&"';"
Sql D Column Formula:
="Insert into X_DEAL (DEAL_ID,Offer,Start_date,End_date,Rate) Values ('"&C2&"','"&VLOOKUP(C2;Deal!C:D;2;FALSE)&"','"&VLOOKUP(C2;Deal!C:E;3;FALSE)&"','"&VLOOKUP(C2;Deal!C:F;4;FALSE)&"','"&VLOOKUP(C2;Deal!C:G;5;FALSE)&"');"
I am struggling to get VBA scripts for the following 4 requirement, your assistance would be greatly appreciated
I have 2 workbooks "Deal_Loader1" and "Promo_Loader", PFA.
i) Script to Enter Input box value as "Deal_Loader1" to auto copy all the Columns in to "Promo_Loader" Workbook under Deal Sheet Columns C:F
ii) Script to Enter Input box value as CRNumber (C12345) in Column B of "Promo_Loader" Deal Sheet same value should be populated until end of the row.
CRNumber will be different for the future entries so when I copy next time the additional entries will be from Deal_Loader2 and those entries should be auto copied same with Input Box value for Deal_Loader2 from last empty row in Columns C:F and For Column B it should be from B12 until end of the row.
iii) Script to auto populate Sql Sheet for the rest of the entries until end of the last row from Deal sheet(A11:E11) based on formulas that we have in column A2:E2 and also for the future entries from Deal_Loader2, entries can be more but I should be able to manage until end of the row every time.
iv) Finally script for Sql: Input Box value as CRNumber to select column D:E entries of all the rows and copy them in to a New OR Existing Notepad file.
Deal G Formula:
=VLOOKUP(D2;Ref_data!A:B;2;FALSE)
Sql A Column Formula: =Deal!A2 Formula is similar on B and C columns
Sql D Column Formula: ="Delete from x_deal where deal_id ='"&C2&"';"
Sql D Column Formula:
="Insert into X_DEAL (DEAL_ID,Offer,Start_date,End_date,Rate) Values ('"&C2&"','"&VLOOKUP(C2;Deal!C:D;2;FALSE)&"','"&VLOOKUP(C2;Deal!C:E;3;FALSE)&"','"&VLOOKUP(C2;Deal!C:F;4;FALSE)&"','"&VLOOKUP(C2;Deal!C:G;5;FALSE)&"');"