473,804 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

convert Dimensional data to Flat data in macro

44 New Member
I am working on a macro and try to convert data in a pivot table to a flat data table automatically.

Eg. Apple Oragne Pear
Tim 1 2 3
Joe 2 3 4
Elle 6 7 8

into


Tim - Apple - 1
Tim - Orange - 2
Tim - Pear - 3
Joe - Apple - 2
Joe - orange - 3
Joe - Pear - 4
Elle - Apple - 6
.......etc
This should be reading from sheet 1 to sheet 2.


I have done a macro recording, such as the folowing :
Sub Flat_Table()
'
' Flat_Table Macro
'
' Keyboard Shortcut: Ctrl+Shift+M
'

Range("A2").Sel ect
Selection.Copy

Sheets("Sheet2" ).Select
Range("A1").Sel ect
ActiveSheet.Pas te

Sheets("Sheet1" ).Select
Range("B1").Sel ect
Application.Cut CopyMode = False
Selection.Copy

Sheets("Sheet2" ).Select
Range("B1").Sel ect
ActiveSheet.Pas te

Sheets("Sheet1" ).Select
Range("B2").Sel ect
Application.Cut CopyMode = False
Selection.Copy

Sheets("Sheet2" ).Select
Range("C1").Sel ect
ActiveSheet.Pas te......etc
-------------------------------------------------

Could any one help me please? Thanks
Jul 10 '08 #1
1 1848
Dököll
2,364 Recognized Expert Top Contributor
Hey there!

Let's try the Access Forum on this one, see what you can gather... I suspect you can get more help there.

Good luck with the project!
Jul 10 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
6706
by: Dan | last post by:
Could someone please help me with auto importing a series of data files into an Access table. I tried to follow code given below in a previous messagebut i'm getting error messages. Here's my database stats: Path: C:\Database (contains the database and all the text files to be imported) Text files to import: (SampleData4.txt and SampleData3.txt as testing examples)
11
4476
by: truckaxle | last post by:
I am trying to pass a slice from a larger 2-dimensional array to a function that will work on a smaller region of the array space. The code below is a distillation of what I am trying to accomplish. // - - - - - - - - begin code - - - - - - - typedef int sm_t; typedef int bg_t; sm_t sm; bg_t bg;
18
2483
by: bsder | last post by:
Hi, Can anyone please tell me how to calculate the size of the following 4-dimensional array, and now to use qsort for sorting on this array? double sp = { 4.0, 5.0, 6.0 }; double spa = { { 4.0, 2.0 }, { 5.0, 8.0 }, { 6.0, 6.0 },
4
6383
by: entitledX | last post by:
Hi, I'm trying to use the HDF library to read a few HDF files that I need to process. The data in each file varies in rows, but the columns remain constant. Because of that, I had dynamically allocated a set of pointer to pointers as my multi-dimensional arrays. Here is my code (i have omitted checking calloc's return value to make this shorter): int **filter; filter = calloc( ylength, sizeof(int*) ); for( i = 0 ; i < ylength...
5
12723
by: XML newbie: Urgent pls help! | last post by:
function to convert string to 1 dimensional array of long in VB.Net
4
2313
by: TG | last post by:
Hi there ! I'm just starting to use Numeric here, and I'm wondering : how can I efficiently initialize every values of a N-dimensional array, given I don't know the number of dimensions ? I'm looking for something like a map function, or a way to conveniently iterate through the whole N-array, but I didn't find anything ... yet. If anyone has a clue, I'm listening.
0
922
by: studdy07 | last post by:
I have a standard Word Merge doc with an autoopen Macro that pulls SQL data in from a view - it works fine. Some of the fields I also need to write to a flat file (like bar code #, Name and Order Number) for our postage meter to read. How can I loop through the data with the Merge - or can I? OR - Do I need to just wait until the merge ends, the open a recordset, populate variables, then write the flat file. Seems redundant to have to do...
152
9933
by: vippstar | last post by:
The subject might be misleading. Regardless, is this code valid: #include <stdio.h> void f(double *p, size_t size) { while(size--) printf("%f\n", *p++); } int main(void) { double array = { { 3.14 }, { 42.6 } }; f((double *)array, sizeof array / sizeof **array); return 0;
0
10791
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not a new concept, there is a concept called Steganography which enables to conceal your secret...
0
9715
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10603
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7643
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3836
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3003
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.