Retrieving Multiple Rows Of Data From One Single Item?
Jan 3, 2014
retrieve the multiple rows of data from one specific item to another worksheet inside same workbook. below attachment is my sample workbook.
inside the workbook, eg.. please have a look on Sheet 3 (the record of the item and its description) will store on Sheet 2. From sheet 1, when user choose the item from drop down list, and click the button will direct to the retrieved result in sheet 2. my question is i cant retrieve the multiple rows of data exactly in the sheet 2. it only remains one item for one row of description.
and below attached picture is what i wish to achieve =)Capture.PNG
View 4 Replies
ADVERTISEMENT
Jun 8, 2013
I have a set of data with 5 columns. The first column is ID. Now I have the same ID recorded several times with different data (in the other 4 columns) against the ID. I want to concatenate the data with the same ID into the same row. The data has already been sorted by ID. If it is the first time this ID appears, record the whole 5 columns. If the ID appears again, then record only the 3rd, 4th and 5th column. When I run my code, I got error 'subscript out of range (Error 9)' . It seems that the array I use has only 5 columns. But I don't know how to modify this.
VB:
Sub Patient_Detail()
Dim n As Integer 'index of rows to record to
Dim i As Integer 'index of column to record from
[Code].....
View 7 Replies
View Related
Jun 29, 2014
Any macro capable of moving data from multiple row to a single one i have attach a sample file before and after ...
View 4 Replies
View Related
Jul 24, 2014
I have a set of data that I need to change the "layout" of. I've had similar situations before, but this one is just killing me. Basically, my data is for item pricing. It is represented as
Item, QTY, Price
A,1,1.25
A,10,1.1
A,25,1
A,100,0.9
B,1,1.25
B,10,1.1
B,25,1
B,100,0.9
C,1,1.25
C,10,1.1
C,25,1
C,100,0.9
Item D,Qty1,P1
Item D,Q2,P2
Item D,Q3,P3
Item D,Q4,P4
However, I need it in the following format:
A,1,10,25,100,1.25,1.1,1,0.9
B,1,10,25,100,1.25,1.1,1,0.9
C,1,10,25,100,1.25,1.1,1,0.9
Item DQ1Q2Q3Q4P1P2P3P4
As a note: there is a maximum of 4 Price/QTY breaks, so the script can be hard coded for that. When I tried this, I had it looking at the Item column, finding out how many breaks there are for a specific item and then doing a loop to extract the qty and price to a single row in the format shown above. It worked for the first 2 items, but then the loop got throw off. I will see if I can reproduce the code for that.
View 4 Replies
View Related
Jul 28, 2006
I imagine my goal could be achieved via some scripting code, but, alas, I don't do vbs. Here's the situation:
I have a spreadsheet generated by another office which lists individuals' names and information about participation in various programs. Each line lists name, address, program title and amount. The next line may be the same name, address with a different program and amount. Each person may have 4-5 entries. I want to make single entries for each individual, with colums showing the programs and amounts.
Current:
ID Name Address Program Amount
1 Bob home A 25
1 Bob home B 37
2 Dave home A 22
2 Dave home B 10
2 Dave home C 21
Need:
ID Name Address Program A Program B Program C
1 Bob home 25 37 0
2 Dave home 22 10 21
Hopefully this makes it a bit more clear. The only way I know how to accomplish this is the "old fashioned" long hand approach of cut & paste. There are several thousand individuals, with (currently) tens of thousands of rows.
View 9 Replies
View Related
Jun 12, 2007
I would like to automate, due to how long it would take to manually organize the data myself. I have all of the raw data needed organized into 3 columns. The problem is that some of the related data is divided up into multiple rows, based on ID number. What I would like to do is take the related CPT codes and respective descriptions, from the same ID number, and place them on the same row. I am going to include some pics and even a small chunk of the source data. Here is a pic of the raw data:
And here is the first 3 already done:
The number of CPT codes per ID number range from 2 - 5 I believe, maybe 6. Not sure if this has any bearing on how it is done.
View 4 Replies
View Related
Oct 19, 2007
I am trying to take data from multiple rows and columns (matrix) and reformat it all to fit in a single column.
It would be great if I could select the cells I want to reformat into the single column as the number of rows and columns containing the original data is not always the same (ie 20x20, 21x35, 56x200) etc...
View 9 Replies
View Related
Oct 29, 2008
transposing and sorting data into multiple columns.
Column 1 for example will have the Parent's Name. Column 2 will have the Children.
If Mark has 3 children, X Y and Z
Jim has two children, A and B
then I want Column 1 to display Mark and Jims Name and column two should display all the children
Here is how I want the data:
Column1 Column 2
Mark X
Mark Y
Mark Z
Jim A
Jim B
Please see attachment.
View 3 Replies
View Related
Apr 12, 2012
I have a single column with multiple rows of data like this: Afirst last, Bfirst last, Cfirst last (all in one cell) etc.
I want to type some names in one cell in the same format (Afirst last, Cfirst last, Bfirst last) but not order and then check if any of those names exist in the first column and count the results of matches.
So in this example I am looking to count Bfirst last and/or Cfirst last in every cell of column A. I need to use a formula.
View 2 Replies
View Related
Jun 19, 2014
I need a macro that will take hours by day (columns) by service (rows) per client (sheet) and summarize the data into one database of rows containing client, service, date, and hours. The "Summary of Charges" should only include service hours > zero. I am attaching a sample file. I have little to no experience with vba so I don't even know where to begin. I can copy code.
View 4 Replies
View Related
Mar 16, 2014
Currently I am facing a problem that I want to copy data from sheet 2 to sheet 1.Here I am using vlookup function.But I have a problem that when there is two items of same name in sheet 1,it copies data from sheet 2 into both same items in sheet 1.How can I restrict and copy data to only 1 items.The sample data is as shown below :
Sheet 1 (Including duplicate item)
Apple
Apple
Ball
Cat
Cat
In sheet 2 (Unique item)
Apple 25
Ball 36
Cat 34
View 12 Replies
View Related
Oct 17, 2013
I'm trying to solve i have multiple books but each book contains same information e.g
Book1
Sheet 1
Date
Name
Sheet 2
Location
Postcode
Book 2
Sheet 1
Date
Name
Sheet 2
Location
Postcode
etc ... there is also multiple sheets in each book all are same layout just each book is different customer.
I'm trying to do is have a Listbox that shows all customer name and link back to His/her file location. Then retrieve certain information and display on blank workbook?
Question:
Can this be done without opening workbook
Considering i have 20+ workbooks and growing is this even possible
Cannot merge workbooks into one as this info is supplied by third party
View 1 Replies
View Related
Aug 27, 2009
I have two lists. One is a database (Worksheet 2) with a lot of information, and another is the list (worksheet 1) I need to fill up the data for. What I want to do is to search for the names that are in worksheet 1 in worksheet 2, and if there is a match, retrieve the missing data in those rows, and paste it back into worksheet 1. For example:
Worksheet 1: Joe
Tim 23
Matt
Worksheet 2: Alex 45
Joe 23
Mark 47
Tim 44
Matt 24
I basically want it to be able to search for the corresponding name, and then pull the number associated with it.
View 2 Replies
View Related
Sep 20, 2013
I am trying to pull data from multiple textboxes on multiple worksheets and compile it into a list on a mastersheet. I have searched multiple forums and I have been unable to piece together anything. I have attached an example workbook of the data that I am trying to compile. I am trying to pull the data for the textbox next to NAME, SS#, and SCHED. I have tried recording a macro for 1 sheet and then modifying the macro to work for on all worksheets but failed miserably.
View 1 Replies
View Related
Nov 28, 2009
I have a long spreadsheet, that has a format something like this: ...
View 6 Replies
View Related
Dec 24, 2007
Is there a way convert single cell with wrap text into multiple cells with the number of resulting rows based on the number of lines in the original cell. Due to the restrictions of my overall printable "document", I must use multiple cells of the same height. Any change of row height would throw off the desired final result.
As an example, when I start with my original cell in text wrap and set column width I get something like the following in cell F2:
ASTM A743 UNS J93254
(SUPER AUSTENITIC)
(LONG LEAD TIME
MATERIAL)
This looks great, but it is all in one cell, and the four lines of wrapped text have obviously increased the row height which is bad.
I have tried using the LEFT and MID functions to force the text into different rows based on character length, but this is sort of messy since I am never sure what the input will be resulting in something like the following (this time in cells F2:F5) with spaces at the beginning of a line or breaks in the middle of words:
ASTM A743 UNS J93254
(SUPER AUSTENITIC)
(LONG LEAD TIME MATE
RIAL)
My ultimate goal would be to somehow format the original input data text so that regardless of the input, the text would be restricted to a certain column width, sending the remaining text to the next consecutive rows down, and maintain the integrity of the original. I can have as many intermediate cells, formatting as I go to get to this point.
Of course, I could manually enter the text in the different rows every time, but it would be nice to have a succession of formatted cells so that the desired end result would be automatic. Hopefully, the answer does not involve too much in the way of macro or any VBA code since I am a pitiful novice, and we are sort of under pressure to get this project under way.
View 9 Replies
View Related
Feb 9, 2007
I have a cash receipt worksheet and want to sum up the days cash. My problem is some days there are one receipt and some there are five. I have to keep hitting the sum button to make it include the proper range.
View 7 Replies
View Related
Feb 4, 2014
I have a database of addresses that has each address as several rows which I want to convert into a single row. In the source file there is a blank row between records. I have attached a sample file with two sheets in it. One is the "before" data format and the other sheet is the "after" example of how I would like it to come out. We have thousands of records to convert so I need something that can be automated instead of a massive cut and paste operation.
Here is the sample: sample conversion.xlsx
View 4 Replies
View Related
Apr 9, 2013
I have a HUGE spreadsheet (1,000,000 rows) that contains a series of reports. The first row of the report contains all of the report identification numbers. The next 20-50 rows contains the report details, all in column A. Then the report ends with a cell in column A containing "[report_end]" and then on the next row the next report begins.
I would like to compress the report details all into a single cell in column A so that there is only one row for each report, sort of like this:
AA | BB | CC | DD
xyz
123
[end_report]
AA | BB | CC | DD
xyz
123
[end_report]
becomes:
AA xyz 123 [end_report] | BB | CC | DD
AA xyz 123 [end_report] | BB | CC | DD
View 5 Replies
View Related
Mar 5, 2014
I have a single column of about 1500 points, and I need them to be separated into many rows of 20 numbers.
I have multiple issues:
1) The middle number of each row (10th and 11th) need to be repeated. So a transpose formula can not work all the way through the 20 numbers. Unless I transpose the first ten, then tranpose the second ten. Is there an easier way around this ?
2) The bigger issue is, I would like to write a formula that can manipulate the date to enter in the correct cell.
To illustrate I will use a set of ten numbers:
1
2
3
4
5
6
7
8
9
10
11
12
INTO
1
2
3
4
5
6
7
8
9
10
11
12
View 9 Replies
View Related
Mar 16, 2014
Macro to sort column data.
I have a spreadsheet in the following format (just a flavour of the format)
SD 1
SD2
SD3
1a
1b
1c
2a
[Code]...
Each row refers to a survey response, the first ten columns being standard demographics.
Following this each group of 5 columns for the next 100 columns represents a single response. What I want to do is convert each single row to multiple rows with the same first 10 columns and each single response on its own row like so:
SD1
SD2
SD3
a
b
c
a
[Code]...
I found an excellent similar example on this board here Convert a single row to multiple rows with the same A column value However I would like my macro to convert to rows even if the cells are blank So each existing row will generate 10 individual reponse rows regardless of data found).
I am interested to know how this would work and how i could modify the variables to acommodate 15 standard demographic fields and 20 columns per individual responses.
View 5 Replies
View Related
Apr 12, 2005
I frequently have to work with tables set up like this:
A1 A2 A3
B1 B2 B3
C1 C2 C3
All I would like to do is to transpose them into one single column:
A1
A2
A3
B1
B2
B3
C1
C2
C3
View 5 Replies
View Related
Feb 16, 2012
I want to transpose multiple rows to single column and I'm dealing with huge data.
For example, I am working with data like this
A1 A2 A3
B1 B2 B3
C1 C2 C3
and I have to transpose to
A1
A2
A3
B1
B2
B3
C1
C2
C3
I'm using following vb code:
Sub ToOneColumn()
Dim i As Long, k As Long, j As Integer
Application.ScreenUpdating = False
Columns(1).Insert
[Code] ........
The script terminate without completing the job and shows error as "runtime error '1004': application -defined or object defined error".
View 8 Replies
View Related
Feb 27, 2007
I have a very large sheet of all US zip codes by county name. Unfortunately, the document builder decided to list up to EIGHTEEN columns of zip codes per county name... I assume to make it easier to look at.
I now need to rebuild the sheet to have one column of county names and *one* column of zip codes, which will be a nearly impossible task if I don't find a way to automate the conversion.
Attached is a sample... sheet 1 is my initial state (except here its 5 columns rather than 18), and sheet 2 is my hoped for end state. Notice that the zip codes can, but don't always, fill every column allotted.
View 3 Replies
View Related
Nov 22, 2012
I am working on putting together a very large spreadsheet covering multiple data sets over multiple states/years. I am trying to convert the data that I have in one spreadsheet (that is arranged like the example below) and make it so that I can paste the data into another spreadsheet as one single row: i.e, 1,651 would follow in the column to the right in the same row as 6.4 and so on. Right now I am having to copy and paste row by row and it is going to take me years.
3,484
2,179
62.5
2,053
58.9
126
5.8
5.2
6.4
[Code] .......
View 7 Replies
View Related
Aug 20, 2008
I have 300 rows worth of data that looks similar to this, all organized in one column:
John Q. Smith
Programmer
2111 NW 13th St
Anywhereville, USA, 55555
(555) 555-5555
Joe P. Snider
Organizer
5645 NW 45th St
Anywhereville, USA, 55555
(555) 555-5555
Patty Williams
Accountant
6454 NW 34th St
Anywhereville, USA, 55555
(555) 555-5555
As you can see it is consistent with the name, position, address line 1, address line 2, Phone number, for every single entry. All my names are already alphabetized so I don't have to worry about it. What I want to do is have the information for each entry translated into 5 separate columns so it looks like this.
John Q. Smith Programmer 2111 NW 13th St Anywhereville, USA, 55555 (555) 555-5555
Joe P. Small Organizer 5645 NW 45th St Anywhereville, USA, 55555 (555) 555-5555
Patty Williams Accountant 6454 NW 34th St Anywhereville, USA, 55555 (555) 555-5555
Supposing I started the sheet in the top left corner at A1, I was just going to have cell B1=A1 then Cell B2=A6 then just autofill down column B but it doesn't work. I have seen some people do something similar to what I want with VBA but I am convinced there has to be something simple in with an excel formula seeing as my information is already so organized and consistent.
View 4 Replies
View Related
Aug 31, 2012
I have a worksheet entitled 'Data'. In this worksheet there is a table consisting of 4 columns plus relevant data:
TABLE 1:
Project
Benefit Type
Delivered or Enabled
Benefit
PJ1
Financial
Delivered
Saving of $4M over 24 months.
[code]....
I have been trying to create a formula that will enable me to pull data from the 'benefit' column(column D) so that the cell contents populate in a single cell in a table in a different worksheet.
TABLE 2:
Financial - Delivered
Financial - Enabled
Tech - Delivered
Tech - Enabled
Green - Delivered
Green - Enabled
[code]....
So, as an example, I am hoping that a formula can be created which pulls the text from relevant cells in column D when criteria from columns A, B and C are met e.g. Tech benefits that are Delivered in PJ2 would populate cell E3 ('Tech -Enabled') in Table 2 with:
Continued maintenance of hardware.
Increased capacity.
View 1 Replies
View Related
Feb 5, 2013
I have two workbooks at the moment, one which holds a whole host of customer and accounts details and another which holds only the customer details. What I'm trying to do is cross reference the two to determine if a customers details appear on both and if they do highlight this, ultimately I'd like it to pull the customers account number back but even if it highlights a match that would be sufficient.
The only unique criteria I have to do this are customer surname and customer postcode.
In the Customer details spreadsheet I'm attempting to enter a formula which will look at the specific surname & postcode held on the row in which it is entered. It will then look at all of the rows on the other spreadsheet and determine whether any of them meet both criteria.
If they do I'd like it to display "match" if they don't I'd like it to display "no match"
View 2 Replies
View Related
May 15, 2013
Standard bar chart. They want our company to always be Yellow. This is a industry standard. Our columns (the bar) needs to be Yellow. As new companies are added to the series, it might change locations in the order. For now, the location is 9th.
Can use formula or use VBA. Can't seem to find a way using the Excel interface to do this.
View 3 Replies
View Related
Jul 3, 2014
I want to split the contents of a single cell(ALT Enter as delimiter) into multiple cells and retain the values in column B.
Ex:
A1: apple
banana
car
house
A2: yellow
B2: building
x
y
B3: O
Output:
sheet 2:
A1: apple B1: yellow
A2: banana B2: yellow
A3: car B3: yellow
A4: house B4: yellow
A5: building B5: O
A6: x B6: O
A7 B7: O
View 9 Replies
View Related