473,669 Members | 2,514 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Transposing cells in Excel

33 New Member
Hi guys

I am have two excel workbooks. One book has data formatted according rows. Example:
Expand|Select|Wrap|Line Numbers
  1. ROW 1: Loan # ; Principal Amount ; Interest Rate ; Date
  2.  
The other book needs to be formatted so that it contains a column that looks like:
Expand|Select|Wrap|Line Numbers
  1. COLUMN: 
  2.              Loan #
  3.              Principal Amount
  4.              Interest Rate
  5.              Date
  6.  
Note that while there are several rows in Book 1, Book 2 should only have ONE column whose values for Loan # ; Principal Amount ; Interest Rate ; Date change depending on the Row selected in Book 1.

What would be the best approach? I am thinking a macro should do:
Expand|Select|Wrap|Line Numbers
  1. Start by selecting a row
  2. Click a button for macro to run
  3. Have macro display information from row in Book 1 into column in Book 2.
  4.  
Sep 25 '08 #1
2 1630
nico5038
3,080 Recognized Expert Specialist
You can create this by activating the macro recorder and use the "Transpose" possibility in sheet 2 when pasting the selected fields from row1.

Nic;o)
Sep 27 '08 #2
NeoPa
32,569 Recognized Expert Moderator MVP
It would be helpful if you clarified your question with some example data.

Is this a simple transpose? Do you need multiple rows to merge into one single column?

If your starting data is :
Expand|Select|Wrap|Line Numbers
  1. 1A 1B 1C
  2. 2A 2B 2C
Do you want results of :
Expand|Select|Wrap|Line Numbers
  1. 1A 2A
  2. 1B 2B
  3. 1C 2C
or :
Expand|Select|Wrap|Line Numbers
  1. 1A
  2. 1B
  3. 1C
  4. 2A
  5. 2B
  6. 2C
Sep 29 '08 #3

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

Similar topics

2
4713
by: Fabio | last post by:
Hello, is there any quite easy solution for the problem of transposing the rows into the columns? I have the following table with some data in it: dealer date 09.00 10.00 11.00 12.00 13.00 14.00 ----------------------------------------------------------------- 1 2004-10-01 1/1 2/3 3/3 3/4 4/5 0/3 1 2004-10-02 0/1 1/3 1/3 1/4 3/5 1/3
3
28505
by: zxo102 | last post by:
Hi there, I need your help for python <--> excel. I want to paste selected cells (range) to different location on the same sheet in Excel through python. I have tried it for a while but could not figure it out. Here is my sample code: import win32com.client xl=win32com.client.Dispatch("Excel.Application") xl.Visible=1 wb = xl.Workbooks.Add( )
3
25319
by: Damian Arntzen | last post by:
I'm a beginner to moderate programmer who's fiddling around with automating Excel, in particular after being able to have the user fill out a form and it then generate the workbook. I can't quite figure out how to get it to Merge cells together - I've found how to do it (I think) but can't nut out the syntax. Any help with this would be much appreciated (I've tried looking for online tutorials, but the ones I've found never touch merging)....
2
46471
by: Chris Bellini | last post by:
Greetings! I'm developing a C# application that needs to read some data from a selected XLS file. I've used VB in the past to automate Excel but this is the first time I've used C#. Back in VB, I was able to retrieve a cell's contents via something like this: Set objExcellApp = CreateObject("Excel.Application") Set objWorkbook = objExcel.Workbooks.Open(strPathToXLS) ' retrive the contents of A1 strData = objExcel.Cells(1, 1).Value
1
5841
by: Glen Vermeylen | last post by:
Hi, For a project at school we have to automate the assignment of seats in classrooms to students during the exams. The lady who previously did everything manually kept the layouts of the classrooms in an excel-document: 1 sheet per classroom, and she marked the cells which represent the seats with a border. The problem however is that she sometimes merged cells together to get a better layout.
5
3036
by: mrid via DotNetMonster.com | last post by:
hi. im exporting data from a vb form to excel. i am able to create a new excel file, save and edit it without any trouble, but the formatting is giving me hell! i need to be able to show certain cells in bold, with underlining etc. i dont understand how, but in the following code, the instruction for bold gets picked up for all the cells (even when i specify font.bold = false), and the underlining is haphazardly used. the font colour...
1
9758
by: mgoold2002 | last post by:
I'm moving some code from Excel vbs into a .NET context and I'm very new to .NET. I'm trying to make this Excel vb code work in .NET. My questions are: how do I reference cells correctly using the common "cells(x,y)" reference, where x and y are integer variables. Also, how do I verify that the cells are empty, since, according to the documentation, the "IsEmpty" function does not work in .NET now? Thanks for any help! ...
1
5155
by: thadson | last post by:
Hi, I'm trying to import specific cells from MS Excel 2000 spreadsheets to MS Access 2000 tables then move the spreadsheets to a different directory. I'm very new to this and I'm having trouble to implement this. I have worked out so far the code to import certain cells into 1 table, but I do not know how to import some other cells into another tables so the data would be connected and remain together. So lets say that I have 2 tables...
4
15481
by: ielamrani | last post by:
Hi, I am getting this error when I try to export to an excel sheet. When I click on a button to export the first time it's fine, I rename the exported excel sheet and I try to export it again and I get the error: Runtime Error 1004: Method ‘Cells’ of Object ‘_Global’ failed It highlight this line: Range("A1:L1").Select sorry the code behind the button is long: . Dim stDocName As String stDocName = "QFinal4"
0
8384
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8896
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...
0
8810
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8590
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8659
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7410
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6211
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
4387
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2035
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.