LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Cell values to an array, then array transpose to another workbook

Hi Howard,

Am Thu, 16 Jan 2014 03:32:03 -0800 (PST) schrieb L. Howard:

I am trying to get the four values in Range("D11,D13,I20,D15") of source workbook and sheet1 to target workbook and sheet ORDER FORM range(A41)up next available row, each in individual cells of that row and in the order they are in.


try:

Sub PriceToPOrder()

Dim wksSource As Worksheet, wksTarget As Worksheet
Dim wkbSource As Workbook, wkbTarget As Workbook
Dim rngSource As Range, rngTarget As Range
Dim varRicho(3) As Variant
Dim varLanier As Variant
Dim rngC As Range
Dim i As Long

Set wkbSource = Workbooks("PRICE COMPARE TEST SHEET.xlsm")
Set wkbTarget = Workbooks("ORDER FORM TEST SHEET.xlsm")
Set wksSource = wkbSource.Sheets("Sheet1")
Set wksTarget = wkbTarget.Sheets("ORDER FORM")

If Not IsFileOpen("C:\Users\Howard Kittle\Documents\ORDER FORM TEST
SHEET.xlsm") Then
Workbooks.Open ("C:\Users\Howard Kittle\Documents\ORDER FORM TEST
SHEET.xlsm")
End If

'Set all the copy cells for RICHO or LANIER

For Each rngC In wksSource.Range("D11,D13,I20,D15")
varRicho(i) = rngC.Value
i = i + 1
Next

wksTarget.Cells(Rows.Count, 1).End(xlUp)(2) _
.Resize(columnsize:=4) = varRicho

End Sub


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Keep original cell formatting when using transpose array formula Claire Charron Excel Worksheet Functions 1 February 1st 12 08:05 PM
Redimming an array dynamically assigned from range (how to redim first dimension of a 2-D array? /or/ reverse the original array order) Keith R[_2_] Excel Programming 3 November 13th 07 04:08 PM
Array: Counting multiple values within array Trilux_nogo Excel Worksheet Functions 4 April 16th 07 03:12 AM
search an array for values contained in another array Cheer-Phil-ly Excel Programming 0 April 12th 07 09:44 PM
Transpose Array drbobsled Excel Discussion (Misc queries) 1 December 1st 06 01:50 AM


All times are GMT +1. The time now is 08:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"