LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 852
Default Array with many cells from a row but not in order or together

This works okay for a few cells when aName is found in aRng and returns four cells to a destination.

aName = InputBox("Enter a name.", "Name Information")

For Each c In aRng
If c = aName Then
c.Copy Sheets("Sheet2").Range("B" & Rows.Count).End(xlUp)(2)
c.Offset(, 1).Copy Sheets("Sheet2").Range("B" & Rows.Count).End(xlUp)(2)
c.Offset(, 4).Copy Sheets("Sheet2").Range("B" & Rows.Count).End(xlUp)(2)
c.Offset(, 8).Copy Sheets("Sheet2").Range("B" & Rows.Count).End(xlUp)(2)
End If
Next

What I have now is when aName is found in aRng then I need several cells in that row returned and transposed to a destination column.

Also, the cells to return are not in order or together.

Say for whatever row aName is in I need cells in columns in this order: C, F, P, S, D&E, R, M, Y, AA, BM. (Example only)

Notice D & E need to be returned to the same destination cell.

I am thinking an array method but am lost on not only on how to nail down the row aName is in but how to reference all the cells by column in that particular row.

Thanks.
Howard
 
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
copy cells down a column (in order) to across a row (same order?? Tampa9 Excel Discussion (Misc queries) 1 December 4th 08 04:23 PM
Order in a array / ListBox Dan Excel Programming 3 September 12th 08 05:25 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
rearrange an array in a different order clui[_12_] Excel Programming 3 December 10th 03 01:16 AM
alfabetical order in array Konrad[_2_] Excel Programming 3 August 20th 03 07:48 PM


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

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"