Convert Column to row with variable data

Hi

I'm using Excel 2k and I have a spreadsheet that looks 
like this

Name    Address
Fred    21 Blah St
        London
Sue     Tower 50
        London
        EC2

and need it to look like this 

Name   Address 1     Address2   Address3
Fred   21 Blah St    London
Sue    Tower 50      London     EC2

I have a macro that can convert from column to row but 
only for a set number of columns.  Is there any way to 
account for the variable amount of data for each address ?

Any help much appreciated 

Thanks
David
0
drandall (1)
10/9/2003 2:32:42 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
326 Views

Similar Articles

[PageSpeed] 57

David:

I suggest the following formulae - copied down as necessary:

C2: =IF(ISBLANK(A2),C1+1,1)
D2: =IF(C2=1,A2,"")
E2: =IF(C2=1,B2,"")
F2: =IF(C3=2,B3,"")
G2: =IF(C4=3,B4,"")
H2, I2, J2:  similar ....


This sorts your data into rows with blank rows in between. Then you can use
a filter or sort to get rid of the blank rows.

This can also be done in VBA, but the above seems simple enough.

HTH

Geoff





"David Randall" <drandall@lw.com> wrote in message
news:006f01c38e72$32fbbb00$a101280a@phx.gbl...
> Hi
>
> I'm using Excel 2k and I have a spreadsheet that looks
> like this
>
> Name    Address
> Fred    21 Blah St
>         London
> Sue     Tower 50
>         London
>         EC2
>
> and need it to look like this
>
> Name   Address 1     Address2   Address3
> Fred   21 Blah St    London
> Sue    Tower 50      London     EC2
>
> I have a macro that can convert from column to row but
> only for a set number of columns.  Is there any way to
> account for the variable amount of data for each address ?
>
> Any help much appreciated
>
> Thanks
> David


0
10/9/2003 5:58:23 PM
Reply:

Similar Artilces:

How to Convert UTC to localTIme(C# )
I have got the value of user account's lastlogon time. Its type is Int64. This value is stored as a large integer that represents the number of 100 nanosecond intervals since January 1, 1601 (UTC)(Refer to MSDN). I don't know how to convert this value to localTime. The following is my code. ################################################################ DirectoryEntry deUser = new DirectoryEntry(ldappath); DirectorySearcher src = new DirectorySearcher(deUser); src.Filter = "(&(objectClass=user)(SAMAccountName=" + accountNa...

Convert text to time value
I have a series of time values in a 'General' format. They are of the type: 184525 Which is 18:45:25 or 6:45:25 pm. A time which is am would be of the type: 12345 Which is 1:23:45 am. Is there a way to convert those 'General' values to an Excel serial so that I can figure out the difference between two times? I've seen a bunch of examples on the net, but none of those that I have found deal with this format that I can tell. Thanks. Hi try =--TEXT(A1,"00:00:00") -- Regards Frank Kabel Frankfurt, Germany "Andy" <amelton@gmail.com> schrieb...

how to convert date
Hi, I'm looking for some method to convert mail date, in format: eg. "Sun, 18 Sep 2005 20:57:08 +0200", to computer local time. I tried CTime but without resoults. m. Have you tried COleDateTime::ParseDateTime()? m.wski21.usunto@aust.com wrote: > Hi, > > I'm looking for some method to convert mail date, in format: > eg. "Sun, 18 Sep 2005 20:57:08 +0200", to computer local time. > I tried CTime but without resoults. > > m. >I'm looking for some method to convert mail date, in format: >eg. "Sun, 18 Sep 2005 20:57:08 +0200&qu...

Delete some column headings from an autofiltered range.
I've selected a range of cells e.g. A6 to CP83 and autofiltered this range. I wish to retain the list headings for columns A to C but wish to remove the list headings from the remaining columns D to CP without affecting the overall list range. Can this be done? "Champ" wrote: > I've selected a range of cells e.g. A6 to CP83 and autofiltered this range. I > wish to retain the list headings for columns A to C but wish to remove the > list headings from the remaining columns D to CP without affecting the > overall list range. Can this be done? .....

How do I convert dates to text keeping the format?
I'm trying to convert a column of data in date format *m/d/yyyy to a text format without converting to serial numbers. Ie: I want to retain the mm/dd/yyyy format. Is there a way to do this? =TEXT(A1,"MM/DD"/YYYY") "sprlarry" <sprlarry@discussions.microsoft.com> wrote in message news:69669AA6-FD15-47D7-843D-FC768728BF7A@microsoft.com... > I'm trying to convert a column of data in date format *m/d/yyyy to a text > format without converting to serial numbers. Ie: I want to retain the > mm/dd/yyyy format. Is there a way to do this? That ...

publisher: 4 Millions Domains data with Category
Successfull Internet and Direct Marketing products on www.promotionsite.net * NEW * DOMUS Domains Toolkit Fall 2004 - Unique on the Net 4 Millions "Whois" Domains data with Expiration Date and Category*. Ultimate Version (October 2004) - Our best rate starts from US *$149*. A wonderful tool for Internet and Direct Marketing. Available in Basic, Advanced and Full Editions. It contains a domain database with 4 millions *FRESH* October 2004 New records .com, .net, .org. 4 Gigabytes MS Excel data zipped on CD-Roms/Dvd. Compression 3:1. MS Excel or Text tab del...

Excel: Auto converting text to numbers
I am downloading an Excel sheet, and the numbers come in as text. It basically comes in as "33 %" but Excel registers this as text, not a percentage. I have a cell that will be used to add the numbers, but since they are text it doesn't work. Given this information, is there a way to convert the imported data into numbers. I would prefer to include this into my formula. The potential numbers are: 0, 1, 2, 3, 4, 0 %, 25 %, 33 %, 50 %, 67 %, 75 %, 100 %, and N/A I would prefer a function, again if possible, that could convert any number. Please note, the space between the nu...

how to convert excel's .cvf file to .csv file
...

Convert Access97 to 2000
Hello, we're currently running access97 and would like to convert it to 2000, but we don't know what is the administrator password for this database. Also this database is running on multi user and have difference permission for diffence users. Could someone help me how to do make this happen but keep the currently permission retaint. Thanks ...

column to row
hi I have a lot of data in one column in access. I would like to have all this data on the one column to be on one row. Tried to copy it to excel and transpose but the data is too long to transpose. Any ideas. i have over 200k rows and want to list it on one line. thanks. t wrote: >I have a lot of data in one column in access. I would like to have all this >data on the one column to be on one row. Tried to copy it to excel and >transpose but the data is too long to transpose. Any ideas. i have over 200k >rows and want to list it on one line. How do you expe...

Convert 2000 Calendar to web page
Greetings, When I convert my calendar for 2005 to a webpage, the page is off by 1 day. Is there a template or fix available to fix this? Thanks, Duane I can edit the html file but this should not be the case. Fixes? Suggestions...other than use Apple? "Duane Perry" <dlp_sr@yahoo.com> wrote in message news:yZRtd.5561$0r.1710@newsread1.news.pas.earthlink.net... > Greetings, > > When I convert my calendar for 2005 to a webpage, the page is off by 1 day. > Is there a template or fix available to fix this? > > Thanks, > > Duane > > Duane, ...

Cannot display all datas in Line Chart
Hi everybody, I have a chart report , the type is line chart. It shows the values per half hour. the X axis is time (Per Half Hour) , the Y axis is the value for that time. it works well when I select the time between 130 Days , but it wont show the more than 130 days. eg : when I choose to show the data from Oct 22, 2007 to Feb 22, 2008 it shows the data from Oct 22,2007 to Feb 02 , 2008 I cannot get the accurity end data but I can guess it from the values in X axis the values are : Oct 22, Oct 26, Oct 31... ...Jan 22 , Jan 24 , Jan 27 , Jan 29 Please if some one can tell me does the...

Specific row at the top of the screen?
I have been looking in this forum for an answer to help me position a specific row located by a macro at the top of the screen. Can someone help? Thank's ahead From the Excel Vba help file... This example moves row ten to the top of the window. Worksheets("Sheet1").Activate ActiveWindow.ScrollRow = 10 -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "Bobby" wrote in message I have been looking in this forum for an answer to help me position a specific row located by a macro at the top of the scre...

XML Note convert to DataSet
Hello, I have this function: object acmResponse = acmLogin.acmString("4001", "", paramFormLogin + paramUserBasics);System.Xml.XmlNode[] acmNodes = (System.Xml.XmlNode[])acmResponse; What I have todo, to convert the XML Object in the DataSet Object? Thank you Matthias ...

Longest Entry in Columns
Hi. What is the best / quickest way to find the longest entry (most characters / numbers, etc.) in a column? Thanks. Hi! This array formula entered with the key combo of CTRL,SHIFT,ENTER will tell you how long the longest entry is in a range of cells: =MAX(LEN(A1:A100)) If you want to identify that entry, you could use conditional formatting: Select the range A1:A100 Goto Format>Conditional Formatting Formula is: =LEN(A1)=MAX(LEN(A$1:A$100)) Click the Format button and select a background fill color OK out Biff >-----Original Message----- >Hi. What is the best / quickest...

Pull data from one form into another
How can I pull an entry placed in a textbox in form 1 into a textbox in form 2, and have the data in the textbox in form 2 change as soon as the data in the textbox in form 1 changes? The change needs to be instantaneous, as the textbox in form 2 will be hidden from the user, so he wont know it is there and wont try to refresh the data himself. Any help will be greatly appreciated. Tom Brown "Tom Brown" <thor177@tampabay.rr.com> wrote in news:468f6df5$0$3101$4c368faf@roadrunner.com: > How can I pull an entry placed in a textbox in form 1 into a > textbox in fo...

Convert
Is it possible to convert a Money file created in the USA version to that of the UK version? Thanks in advance The general way is QIF Export then Import. It's involved and has limitations like loan accounts don't QIF. See http://www.bollar.org/msmoney/#Q1. "Crispy" <nowayspammers@hotmail.com> wrote in message news:uQKSfzfyDHA.2500@TK2MSFTNGP09.phx.gbl... > Is it possible to convert a Money file created in the USA version to that of > the UK version? ...

Problem converting from Quicken to M2005
My Quicken files are mostly investment related, and generally converted fine. However all bonds (regular and muni's) converted as Investment type: Mutual Fund, not Bond. (1) How do I prevent that, (2) How do you change the Investment Type for an item? Thank you. In microsoft.public.money, Mike wrote: >My Quicken files are mostly investment related, and generally >converted fine. However all bonds (regular and muni's) converted as >Investment type: Mutual Fund, not Bond. (1) How do I prevent that, (2) Money typically converts custom data types from Quicken into funds. I thou...

CRM Contact to Outlook Contact Data Synchronization Mappings
Is it possible to modify the CRM Contact to the Outlook Contact Data Synchronization Mappings in version 4.x? We have a client who would like to map Address 2 on the CRM Contact to the Home Address fields on the Outlook Contact. If it is possible, does anyone know the specific settings to modify for this? Yes only through CRM SDK and outlook offline plugins you can achieve that. for more see crm sdk. let me know if you need any help -- Regards, Imran MS CRM Certified Professional http://microsoftcrm3.blogspot.com Chat with me on MSN / Gmail / Skype : ID Is :.. mscrmexpert@gmail.c...

calculate data from a different file
Is it possible to have a cell return a value from another file that is saved on a server without that file being opened. Here is the formula I am using: =COUNTIF(OFFSET('P:\Manpower\[Copy of Manpower 10-25 to 12-30.xls]Daily MP'!$A:$A,0,MATCH(F$3,'P:\Ohio\Manpower\[Copy of Manpower 10-25 to 12-30.xls]Daily MP'!$5:$5,0)-1),"*" & $B5 & "*") but all I get is #VALUE! if this file is not open on the PC I'm using. ...

Number of hrs worked in a week, based on dates in a different column
Hi. I'm hoping someone will give this a try. I'd like to enter a function into each cell in column D so that the total hours worked for the previous week appears each Sunday. For instance, cell D6 would display 11, the sum of C2:C6 (note this is a short week). Cell D20 would display 22.5, the sum of C7:C20. On some days, no work at all is performed, but on other days multiple tasks are performed. The only cells in column D that should display a value are the Sunday's... all other cells should display nothing. Thanks very much for your help!! Gregg. ...

Numbers converting to decimal
I a trying to figure out why when I type 11 and automatically converts it to .11, if I type 11. it will stay 11,if I change all the cells to text then back to number they willstay. I have checked the formatting of the cells, it even happens when I open a brand new worksheet. Any ideas? Thanks Dawn Hi Dawn, Tools>Option>Edit, uncheck Fixed Decimal -- Kind Regards, Niek Otten Microsoft MVP - Excel "DawnP" <anonymous@discussions.microsoft.com> wrote in message news:c3cf01c48a05$d75359d0$a501280a@phx.gbl... > I a trying to figure out why when I type 11 and &...

Handling blank data points
I have a chart which is has "" in a formula to clear contents when not applicable to show error. This results in the chart treating the cell as 0 and therefore ugly result in data point. All other post responses to this type of question suggest using NA() and conditional formation to hide the error.. Unfortunately when this is used this screws up my SUM() and AVG() formulas.. Any other suggestions? Thanks Jo Hi Jo, I don't know if this is the best way but what I have done under similar circumstances is use the #N/A for the chart series data column and then I use a hel...

Inventory list columns
There needs to be more columns avaialble in the inventory and other lists. It would also be nice to be able to print from the inventory lists. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en...

Converting Quicken 2004 to Money
Quicken 2004 has many bugs, and I have had it. The most recent being that it doesn't work AT ALL now that it is the year 2004. I have had to change the date on my computer today to open it. I want to get Money instead, however I do not know if Money can get my data from the 2004 version. Does anybody know for sure? Yes is the answer to the question you posed. No is the answer to the question you are getting to but didn't pose. M04 imports Q03 and earlier. If the past predicts the future M05 will import Q04. "Colin" <anonymous@discussions.microsoft.com> wrote ...