aaronph
03-08-2016, 09:49 AM
Hello fellas, would appreciate if you guys could help me out here. I have this bunch of code here to save to column B. But Im looking for code to allow me to save the data to column C if B is filled up. And to D if B and C is filled up and so on..
Sub QuotationSave()
Sheets("Database").Select
Range("B1").Formula = "=CONCATENATE($B$2 & "" "" & $B$3 & "" "" & Quote!$H$7)"
Range("B2").Formula = "=Quote!$H$6"
Range("B3").Formula = "=Quote!$D$18"
Range("B4").Formula = "=Quote!$H$5"
Range("B5").Formula = "=Quote!$H$7"
Range("B6").Formula = "=Quote!$C$12"
Range("B7").Formula = "=Quote!$C$9"
Range("B8").Formula = "=Quote!$H$42"
Range("B9").Formula = "=CONCATENATE(Quote!$C$21 & "" | "" & Quote!$C$22 & "" | "" & Quote!$C$23 & "" | "" & Quote!$C$24 & "" | "" & Quote!$C$25 & "" | "" & Quote!$C$26 & "" | "" & Quote!$C$27 & "" | "" & Quote!$C$28 & "" | "" & Quote!$C$29 & "" | "" & Quote!$C$30 & "" | "" & Quote!$C$31 & "" | "" & Quote!$C$32 & "" | "" & Quote!$C$33 & "" | "" & Quote!$C$34 & "" | "" & Quote!$C$35 & "" | "" & Quote!$C$36)"
Range("B10").Formula = "=IFERROR(VLOOKUP(""Adjustment"",Quote!$C$21:$H$36,3,0),""Not Applicable"")"
Range("B11").Formula = "=Quote!$C$9"
Range("B12").Formula = "=Now()"
Range("B15").Formula = "=IF(B14<>"""",""Y"",""N"")"
Range("B1:B15").Select
Selection.Copy
Range("B1:B15").PasteSpecial xlPasteValues
Sheets("Quote").Select
MsgBox "Quotation is now in our records."
End Sub
Thank you in advance for your time!
Aaron
Sub QuotationSave()
Sheets("Database").Select
Range("B1").Formula = "=CONCATENATE($B$2 & "" "" & $B$3 & "" "" & Quote!$H$7)"
Range("B2").Formula = "=Quote!$H$6"
Range("B3").Formula = "=Quote!$D$18"
Range("B4").Formula = "=Quote!$H$5"
Range("B5").Formula = "=Quote!$H$7"
Range("B6").Formula = "=Quote!$C$12"
Range("B7").Formula = "=Quote!$C$9"
Range("B8").Formula = "=Quote!$H$42"
Range("B9").Formula = "=CONCATENATE(Quote!$C$21 & "" | "" & Quote!$C$22 & "" | "" & Quote!$C$23 & "" | "" & Quote!$C$24 & "" | "" & Quote!$C$25 & "" | "" & Quote!$C$26 & "" | "" & Quote!$C$27 & "" | "" & Quote!$C$28 & "" | "" & Quote!$C$29 & "" | "" & Quote!$C$30 & "" | "" & Quote!$C$31 & "" | "" & Quote!$C$32 & "" | "" & Quote!$C$33 & "" | "" & Quote!$C$34 & "" | "" & Quote!$C$35 & "" | "" & Quote!$C$36)"
Range("B10").Formula = "=IFERROR(VLOOKUP(""Adjustment"",Quote!$C$21:$H$36,3,0),""Not Applicable"")"
Range("B11").Formula = "=Quote!$C$9"
Range("B12").Formula = "=Now()"
Range("B15").Formula = "=IF(B14<>"""",""Y"",""N"")"
Range("B1:B15").Select
Selection.Copy
Range("B1:B15").PasteSpecial xlPasteValues
Sheets("Quote").Select
MsgBox "Quotation is now in our records."
End Sub
Thank you in advance for your time!
Aaron