Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 18th, 2010, 11:08 AM
Registered User
 
Join Date: Jun 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Convert table to different form using vba

hi
so i need to convert a table into a different form using vba
ex. say a spreadsheet has two tables
Date : q/q/qq
a b c
j 1 2 3
k 3 2 1
l 2 3 1

Date : x/x/xx
x y z
q 1 2 3
w 3 2 1
e 2 3 1

to

Date RowHead ColHead Value
q/q/qq a j 1
q/q/qq a k 3
q/q/qq a l 2
q/q/qq b j 2
q/q/qq b k 2

You get the idea I have to do this in vba and the data is stored as a vba array in memory and is on the spreadsheet as well.

Last edited by mkhanna; June 18th, 2010 at 11:11 AM..
 
Old June 18th, 2010, 10:23 PM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi

Since there is not direct option to transpose etc, you need to loop through the Array and then place the value in cells

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
 
Old June 21st, 2010, 09:01 AM
Registered User
 
Join Date: Jun 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default help

Thats what i am having a problem with i dont get how to place the valeus in a new arrya without using like 8 nested for loops
 
Old June 25th, 2010, 04:58 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi

If this is multi-dimensioned array, you need to plan how to place the elements in the array so that the transpose can be done easier

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert VBA to vb.Net headworth Excel VBA 1 July 22nd, 2009 09:51 PM
Convert VBA Add-in to .DLL neodjandre VB How-To 0 October 27th, 2008 01:23 PM
Display Table Data in a Form using VBA hewstone999 Access VBA 1 February 28th, 2008 08:26 AM
Convert xls for vba state VB How-To 1 September 30th, 2004 06:29 AM
VBA code convert to SQL omnicap1 Access VBA 2 August 23rd, 2004 03:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.