LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 587
Default Combining two separate lists and creating new values

hi ginase,

assume that the data is on Sheet1, account numbers are in the range A1:A50 and part numbers in the range B1:B350
the result will be placed on Sheet2


Sub test()
Dim i As Integer, x As String, y As String, n As Integer
For i = 1 To 17500 Step 350
n = n + 1
With Sheets("Sheet2")
Sheets("Sheet1").Range("A" & n).Copy .Range(.Cells(i, 1), .Cells(i + 349, 1))
Sheets("Sheet1").Range("B1:B350").Copy .Range(.Cells(i, 2), .Cells(i + 349, 2))
Application.CutCopyMode = False
End With
Next
End Sub


--
isabelle




Le 2012-04-24 10:48, ginase a écrit :
I'm sure there's a way to do this but just can't seem to get it. I have
two separate lists in Excel. One is customer account numbers, of which
there are 50, and one is part numbers, of which there are 350. Each
account number only appears once and each part number only appears once.


I need to upload these to another program and so need to create an Excel
sheet where in column A I have each account number listed and in column
B I have each part number listed (meaning that each account number will
be listed 350 times as there will be one row for each part number
against that account number). In total there will be 17500 entries.
What I'm trying to avoid doing is having to copy and paste to achieve
this!

I'd appreciate any help :)




 
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
Matching and combining information on two separate worksheets moparfamily Excel Worksheet Functions 2 January 10th 10 02:14 AM
combining data from two separate sheets [email protected] New Users to Excel 1 October 8th 09 03:40 AM
Values from 3 separate drop-down lists entered into single cell Smatass Excel Worksheet Functions 4 September 16th 07 10:17 AM
Combining 2 lists stevenrhonda New Users to Excel 1 March 5th 06 10:42 PM
creating drop down lists where you can select multiple values Angella Excel Discussion (Misc queries) 2 April 23rd 05 04:58 PM


All times are GMT +1. The time now is 10:30 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"