Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ed Ed is offline
external usenet poster
 
Posts: 279
Default add lines of data to spreadsheet

I have 2 spreadsheets with related data

spreadsheet1:
code data1
1 asd
2 qwe
3 zxc
etc (very long list... with several more columns...)

spreadsheet2:
code data2
1 poiu
3 lljh
etc (list can be short, with more columns, and updateable) all codes in
spreadsheet2 ARE included in spreadsheet 1

is there a way to append this data, so that it will show something like:

code data1 data2
1 asd poiu
2 qwe
3 zxc lljh
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default add lines of data to spreadsheet

Assuming the entry 1 is in A2 of Sheet1 and the entries 1 and poiu are in
A2 and B2, respectively, of Sheet2:
In C2 of Sheet1 use =VLOOKUP(A2,Sheet2!$A$2:$B$999,2,FALSE) to get the data
needed in C2 of Sheet1.
best wishes & Merry Christmas
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"ed" wrote in message
...
I have 2 spreadsheets with related data

spreadsheet1:
code data1
1 asd
2 qwe
3 zxc
etc (very long list... with several more columns...)

spreadsheet2:
code data2
1 poiu
3 lljh
etc (list can be short, with more columns, and updateable) all codes in
spreadsheet2 ARE included in spreadsheet 1

is there a way to append this data, so that it will show something like:

code data1 data2
1 asd poiu
2 qwe
3 zxc lljh



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default add lines of data to spreadsheet


Sub transferdata()
ds = "DestinationSheet"
With Sheets("Sourcesheet")
For Each c In .Range("a16:a" & .Cells(.Rows.Count, "a").End(xlUp).Row)
s = Sheets(ds).Columns(1).Find(c).Row
sc = Sheets(ds).Cells(s, "iv").End(xlToLeft).Column + 1
Sheets(ds).Cells(s, sc).Value = c.Offset(, 1)
Next
End With
End Sub

--
Don Guillett
SalesAid Software

"ed" wrote in message
...
I have 2 spreadsheets with related data

spreadsheet1:
code data1
1 asd
2 qwe
3 zxc
etc (very long list... with several more columns...)

spreadsheet2:
code data2
1 poiu
3 lljh
etc (list can be short, with more columns, and updateable) all codes in
spreadsheet2 ARE included in spreadsheet 1

is there a way to append this data, so that it will show something like:

code data1 data2
1 asd poiu
2 qwe
3 zxc lljh



Reply
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
Data Matching Button for MS Excel 2007 or later Mr. Low Excel Worksheet Functions 0 October 21st 06 10:07 AM
Baffling! Spreadsheet Data Form Size Jim Excel Discussion (Misc queries) 0 May 4th 06 07:41 PM
Inserting a new line when external data changes Rental Man Excel Discussion (Misc queries) 0 January 11th 06 07:05 PM
Inserting a new line in spreadsheet Rental Man Excel Discussion (Misc queries) 2 January 9th 06 04:55 PM
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM


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