Macros question?

Sunset Decks

New Member
Joined
Mar 20, 2009
Messages
2
We have recently set up an excel workbook to enter our customer information as it comes in when we set up appointment. This info. is printed out as our customer sheet and all the info. from it goes to other worksheets to estimate the job. Is there a way/how can I use that general customer info. (name, address, phone, etc.) and transfer it to a different document that would store only that info. from each customer? so that I can have a database for mailings, etc. :)
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Welcome to the Board!

Sure, but it involves VBA.

Here is an example of how to transfer data from several cells to a database worksheet:

<font face=Calibri><SPAN style="color:#00007F">Sub</SPAN> foo()<br>    <SPAN style="color:#00007F">Dim</SPAN> LastRow <SPAN style="color:#00007F">As</SPAN> Range<br>    <SPAN style="color:#00007F">Dim</SPAN> ws <SPAN style="color:#00007F">As</SPAN> Worksheet<br>        <SPAN style="color:#00007F">Set</SPAN> LastRow = Sheets("Data").Cells(Rows.Count, "A").End(xlUp)<br>        <SPAN style="color:#00007F">Set</SPAN> ws = Sheets("Invoice")<br>        <br>            <SPAN style="color:#00007F">With</SPAN> LastRow<br>                <SPAN style="color:#007F00">'   Copy cells A1, B2 & C3 from the Invoice sheet to a</SPAN><br>                <SPAN style="color:#007F00">'   new row on the Data sheet</SPAN><br>                .Offset(1) = ws.Range("A1").Value<br>                .Offset(1, 1) = ws.Range("B2").Value<br>                .Offset(1, 2) = ws.Range("C3").Value<br>            <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN><br>        <br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

If you PM me your e-mail address I can send you an invoicing template that has this functionality.

Hope that helps,
 
Upvote 0

Forum statistics

Threads
1,207,090
Messages
6,076,519
Members
446,211
Latest member
b306750

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top