Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Merging Question

I'm not really sure if this is possible but I thought maybe someone could
help. I have information from 12 months in 12 different spreadsheets. There
is a unique identifer for each row... I want to merge the unique identifier
and 4 other columns into one sheet. Each month will be in a different column
with the date at the top. Is there a way to merge the unique identifier so
that the same product information will be in the same row? I can start by
copying all the information into one sheet from the 12 different sheets.. but
I'm not familiar with the merge feature. Any will be greatly appreciated!
Thanks in advance!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Merging Question

I don't think there is a merge feature. There is a consolidate feature under
the data menu, but I don't think it would do what you describe.

If you got everything onto one sheet you could probably achieve your purpose
by then creating a pivot table (again, under the data menu).


Another way would be to put a series of vlookup functions in the approriate
columns of the consolidation sheet and have them "lookup" the values in the
source sheets against a list of these unique identifier numbers in column A.

--
Regards,
Tom Ogilvy



"NewToVB" wrote:

I'm not really sure if this is possible but I thought maybe someone could
help. I have information from 12 months in 12 different spreadsheets. There
is a unique identifer for each row... I want to merge the unique identifier
and 4 other columns into one sheet. Each month will be in a different column
with the date at the top. Is there a way to merge the unique identifier so
that the same product information will be in the same row? I can start by
copying all the information into one sheet from the 12 different sheets.. but
I'm not familiar with the merge feature. Any will be greatly appreciated!
Thanks in advance!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Merging Question

Oh ok. How do you type a vlookup formula directly into a cell with code?

"Tom Ogilvy" wrote:

I don't think there is a merge feature. There is a consolidate feature under
the data menu, but I don't think it would do what you describe.

If you got everything onto one sheet you could probably achieve your purpose
by then creating a pivot table (again, under the data menu).


Another way would be to put a series of vlookup functions in the approriate
columns of the consolidation sheet and have them "lookup" the values in the
source sheets against a list of these unique identifier numbers in column A.

--
Regards,
Tom Ogilvy



"NewToVB" wrote:

I'm not really sure if this is possible but I thought maybe someone could
help. I have information from 12 months in 12 different spreadsheets. There
is a unique identifer for each row... I want to merge the unique identifier
and 4 other columns into one sheet. Each month will be in a different column
with the date at the top. Is there a way to merge the unique identifier so
that the same product information will be in the same row? I can start by
copying all the information into one sheet from the 12 different sheets.. but
I'm not familiar with the merge feature. Any will be greatly appreciated!
Thanks in advance!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Merging Question


Range("D7").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-3],RC[4]:R[18]C[5],2,FALSE)"

This will lookup the value in cell A7 in the table H7 to I25


"NewToVB" wrote:

Oh ok. How do you type a vlookup formula directly into a cell with code?

"Tom Ogilvy" wrote:

I don't think there is a merge feature. There is a consolidate feature under
the data menu, but I don't think it would do what you describe.

If you got everything onto one sheet you could probably achieve your purpose
by then creating a pivot table (again, under the data menu).


Another way would be to put a series of vlookup functions in the approriate
columns of the consolidation sheet and have them "lookup" the values in the
source sheets against a list of these unique identifier numbers in column A.

--
Regards,
Tom Ogilvy



"NewToVB" wrote:

I'm not really sure if this is possible but I thought maybe someone could
help. I have information from 12 months in 12 different spreadsheets. There
is a unique identifer for each row... I want to merge the unique identifier
and 4 other columns into one sheet. Each month will be in a different column
with the date at the top. Is there a way to merge the unique identifier so
that the same product information will be in the same row? I can start by
copying all the information into one sheet from the 12 different sheets.. but
I'm not familiar with the merge feature. Any will be greatly appreciated!
Thanks in advance!

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Merging Question

Sub AddFormulas()
With Worksheets("Summary")
Set rng = .Range(.Cells(2, 1), .Cells(2, 1).End(xlDown))
End With
rng.Offset(0, 1).Resize(, 5).Formula = _
"=Vlookup($A2,January!$A$1:$G$200,column(),Fal se)"
rng.Offset(0, 6).Resize(, 5).Formula = _
"=Vlookup($A2,February!$A$1:$G$200,column()-5,False)"

End Sub

worked for me. Extend it to include all months and modify it to match your
data.

It assumes the unique identifier is is in column A of each sheet.

--
Regards,
Tom Ogilvy


"NewToVB" wrote:

Oh ok. How do you type a vlookup formula directly into a cell with code?

"Tom Ogilvy" wrote:

I don't think there is a merge feature. There is a consolidate feature under
the data menu, but I don't think it would do what you describe.

If you got everything onto one sheet you could probably achieve your purpose
by then creating a pivot table (again, under the data menu).


Another way would be to put a series of vlookup functions in the approriate
columns of the consolidation sheet and have them "lookup" the values in the
source sheets against a list of these unique identifier numbers in column A.

--
Regards,
Tom Ogilvy



"NewToVB" wrote:

I'm not really sure if this is possible but I thought maybe someone could
help. I have information from 12 months in 12 different spreadsheets. There
is a unique identifer for each row... I want to merge the unique identifier
and 4 other columns into one sheet. Each month will be in a different column
with the date at the top. Is there a way to merge the unique identifier so
that the same product information will be in the same row? I can start by
copying all the information into one sheet from the 12 different sheets.. but
I'm not familiar with the merge feature. Any will be greatly appreciated!
Thanks in advance!

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
question related to merging multiple statements Dharmesh[_2_] Excel Worksheet Functions 5 May 1st 10 03:10 PM
Merging fields question Mikael Lindqvist Excel Worksheet Functions 2 November 15th 07 03:37 PM
some merging question aldaris New Users to Excel 1 March 10th 06 02:48 AM
Question about merging data [email protected] Excel Worksheet Functions 1 January 31st 06 07:38 PM
Question about merging macros Greegan Excel Worksheet Functions 2 August 7th 05 11:46 PM


All times are GMT +1. The time now is 12:10 AM.

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

About Us

"It's about Microsoft Excel"