ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   importing xcel into outlook (https://www.excelbanter.com/excel-discussion-misc-queries/4244-importing-xcel-into-outlook.html)

RV

importing xcel into outlook
 
I have a file which has the names, address etc on each row. For example row
1, name, row 2 address, row 3 city and state, row 4, phone. Can this somehow
be imported into outlook contacts? It is a large file and would take quite a
lot of work to drag each record from its row, into a column format. But i do
want to get it into the OUtlook contact list, for sales calls. Thanks

Gord Dibben

You will have to get the data into a one-address per row format.

i.e. Column A is name, Column B is address, Column C is city and state,
Column D is phone.

Then save as a *.csv file for import to Outlook.

If you data is consistent as your example, 4 rows per person, you can
transpose using this macro.

In the "columns desired" inputbox enter 4

Sub ColtoRows_NoError()
Dim Rng As Range
Dim i As Long
Dim j As Long
Dim nocols As Integer
Application.ScreenUpdating = False
Set Rng = Cells(Rows.Count, 1).End(xlUp)
j = 1
On Error Resume Next
nocols = InputBox("Enter Number of Columns Desired")
For i = 1 To Rng.Row Step nocols
Cells(j, "A").Resize(1, nocols).Value = _
Application.Transpose(Cells(i, "A").Resize(nocols, 1))
j = j + 1
Next
Range(Cells(j, "A"), Cells(Rng.Row, "A")).ClearContents
Application.ScreenUpdating = True
End Sub


If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.


Gord Dibben Excel MVP



On Wed, 19 Jan 2005 15:59:03 -0800, "RV" wrote:

I have a file which has the names, address etc on each row. For example row
1, name, row 2 address, row 3 city and state, row 4, phone. Can this somehow
be imported into outlook contacts? It is a large file and would take quite a
lot of work to drag each record from its row, into a column format. But i do
want to get it into the OUtlook contact list, for sales calls. Thanks



RV

Thanks a lot, appreciate it.
I tested it on a 3-record file and it worked great, but it freaked when I
ran it on the larger file. Records were not right -- so I'll go back and
check my spacing in the file and see if there are rows out.
Thanks again -- made my life a lot easier! Trying to import call lists into
Outlook so I can better track my sales conversations.
have a good night


All times are GMT +1. The time now is 01:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com