View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
UofMoo[_4_] UofMoo[_4_] is offline
external usenet poster
 
Posts: 1
Default VB to copy invoices


Hi Rick,

If you just have a summary line you want copied, you could use vlooku
in the invoice spreadsheet to just pull the data you want from th
other two spreadsheets.

=vlookup(lookup_value,table_array,col_index_num,ra nge_lookup)
where
-lookup_value is the company ID or some common data
-table_array is the data to look up the lookup_value in (other shee
reference)
-col_index is the column to return (ie, sales column etc from othe
sheets)
-range_lookup should be false unless your lookup data is sorted

If you want to use VB you'd probably want to look at something lik
this:
Sheets("custinfo").Range("A1:A6").Copy _
Destination:=Sheets("invoice").Range("C2"

--
UofMo
-----------------------------------------------------------------------
UofMoo's Profile: http://www.excelforum.com/member.php...fo&userid=2648
View this thread: http://www.excelforum.com/showthread.php?threadid=39760