moving data from one workbook to add to a list in a second

adrockuk

New Member
Joined
Jan 25, 2005
Messages
3
I have a workbook saved on a shared network which is basically a simple two column table, sequencial Order Numbers against random, numeric Call Numbers.

I want another worksheet to be able to refer back to this list and find the next lowest unallocated Order Number and copy this figure over to a cell in the worksheet. The Call Number is also to be taken from the worksheet and placed next to the Order Number on the list thereby allocating that order number to the call number.

I realise this would be a fairly simple procedure for most of you on this board but i'm at a loss as to where to start. If someone would please be kind enough to point me in the right direction for further reading (key VB commands etc) i'd be grateful.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

adrockuk

New Member
Joined
Jan 25, 2005
Messages
3
Re: moving data from one workbook to add to a list in a seco

Ok,

Just to help any people who look at this when searching for their own solutions i finally came up with the following piece of code which seems to be working ok


Range("A7").Select
Selection.Copy


Workbooks.Open Filename:="\\Twin_peaks\account_coordinators\COrder.xls"
Workbooks("COrder").Activate
Sheets("Sheet1").Range("A65536").End(xlUp).Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues

Selection.Offset(0, 1).Copy

Workbooks("Calls order form").Activate
Range("E7").Select
Selection.PasteSpecial Paste:=xlPasteValues
Workbooks("COrder.XLS").Close SaveChanges:=True

There may be better ways of doing this and maybe redundant lines in my code (any tips appreciated) but it seems to be doing what I want.
 

Forum statistics

Threads
1,148,275
Messages
5,745,799
Members
423,974
Latest member
highvoltageacdc

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
Top