There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Business Applications
Tag Cloud
audio blue blue screen boot bsod compaq computer cpu crash dell drivers dvd error excel firefox format freeze freezing hard drive install internet internet explorer kb951748 lan laptop loss of internet malware memory motherboard network networking outlook outlook 2007 problem restart screen security slow sound startup trojan update virus vista windows windows xp winxp wireless zonealarm zone alarm
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Business Applications >
concatenate worksheets with different number of variables


Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
27-Aug-2008, 10:51 AM #16
Quote:
Originally Posted by slurpee55 View Post
AJ, would your code here

Sheets(2).Rows("1:1").Copy
shm.Cells(1, 1).PasteSpecial xlPasteValues
Application.CutCopyMode = False

require that the sheet have all the possible values for headers in it?
No it don't need them!
It will copy the headers from the first sheet with data, after that it will check for each header in each sheet if it exist in master sheet, if so then the match function will return the column number there this header is, id no, then again using match (but not the exact match) will get the number of the closer header (by name) and insert a new column after it, and name it accordingly.

In the end you get the full list of all possible headers in that workbook and all the data on the master sheet.
__________________
The BestS
AJ
slurpee55's Avatar
Computer Specs
Distinguished Member with 4,517 posts.
 
Join Date: Oct 2004
Location: Southwest Iowa....
Experience: Currently stupid...
27-Aug-2008, 12:30 PM #17
Way too slick!
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
27-Aug-2008, 12:44 PM #18
Quote:
Originally Posted by slurpee55 View Post
Way too slick!
Let's wait for the OP's response. To see if the code does that he needs!
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 05:46 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.