Combine Data Based On Data In 2 Other Columns

Feb 20, 2007

I have data in columns A:D with the headings Proposal, Sort_Code, Seq, Comm, and data in row 2:???, it is in the format below, / is to show a new column, I want to look at the proposal column (A) and the sort_code column (B) and then take all the data that is associated with it in the comm column(D) and combine it in column E on the first row of the proposal number. A Formula or macro would work for me.

0733596/001/1/line 1
0733596/001/1/line 2
0733596/001/1/line 3
0733596/001/1/line 4
0733596/002/1/line 1
0733596/002/1/line 2
0746715/001/1/line 1
0746715/001/1/line 2
0746715/002/1/
0732387/001/1/
0732387/002/1/line 1
0732387/003/1/..........

View 9 Replies


ADVERTISEMENT

Combine Data From Two Columns

Feb 16, 2007

I am trying to do something that would look at column B and for each value that is the same in any row in column B, it would look to column A and add that value into a text string of all those values in column C separated by commas.

example, If A1=37294 A2=37295 A3 = 37296 A4=37297 A5 = 37298 and B1 = abc B2=ABC B3=ABC B4=XYZ and B5=XYZ I want C1 to result in 37294,37295,37296. And I want C2 to result in 37294,37295,37296 and C3 to result in 37294,37295,37296 and C4 to result in 37297,37298 and C5 to result in 37297,37298.

View 4 Replies View Related

Combine Data From Multiple Columns

Jan 8, 2014

My workbook contains information about investigations. Each investigation gets a number and a line in the workbook. Many infos are stored: dates, subject, ...

A dynamic table contains all those informations, which allows me to manipulate data pretty easily.

Issue: For one of the characteristics of the investigation (let's say names), several results might have to be entered. For example, one investigation can have 3 different names, the next one only 2 and another one can have 6.

This causes a problem regarding the manipulation of the data.

Right now I have 10 columns "name 1" "name 2" .... and only those who need to be filled are filled. I can't however efficiently manipulate the data. For example, George could have been entered in "name 1" for the investigation 1 and in "name 2" for another investigation. Using a pivottable, to track George I'd have to select him in all 10 columns.

It seems to me the best choice would be to somehow index the names into a single column with each name linked to its investigation number..

With the index function I have 2 issues:

- It starts by going down the 1st column, then goes to 2nd, ... where I'd want all names of 1 row then names of 2nd row.

Solved this with this formula:

I turned my "names" columns in a ranged name "Names"

but - When fields are empty I get 0s. When I try to remove them with an if statement, it'll just give me empty cells. I'd prefer to skip the empty cells.

Also, I don't know how to 'link' them to my investigation number...

I have this (dynamic) table:

investigation number name 1 name 2 name 3
001 George Paul
002 Chris George Suzy

And I want something like this:

Investigation number Names
001 George
001 Paul
002 Chris
002 George
002 Suzy

View 14 Replies View Related

Combine Data From Multiple Columns In To One

Sep 2, 2009

I have attached a spreadsheet. I have a data set with ID's in column A and data in columns to the right. If an ID has only one entry then there will only be a value in column B if an ID has 2 entries then there will be a value in Columns B and C, if they have 3.......... And so on....

In my attached file I have created a macro that filters each column and copies the values to another sheet. If an ID had 5 entries (B-F) I would want to have 5 rows for that ID. The attached example macro does what I want but the real data has over 50 columns. Is there a more efficient way of doing this?

View 4 Replies View Related

Combine Multiple Columns Of Data Into One Column?

Mar 6, 2013

sample1.xlsx

Sample file attached. How do I combine the data in columns B-E into column A? Obviously in my sample file you'd use a simple cut/paste but my actual file has hundreds of columns and rows so cut/paste isn't an option. I need to move all the data into column A.

View 4 Replies View Related

Searching Data In Two Columns And Combine Results In One Row?

Jan 13, 2012

I have two sets of data, and one colum in each set is titled ID numbers. I would like to search both those colums and combine the matching ID numbers in one row?

View 2 Replies View Related

Combine Data From Multiple Columns For Trending

Jan 6, 2014

Context: My workbook contains information about investigations. Each investigation gets a number and a line in the workbook. Many infos are stored: dates, subject, ...

A dynamic table contains all those informations, which allows me to manipulate data pretty easily.

Issue: For one of the characteristics of the investigation (let's say names), several results might have to be entered. For example, one investigation can have 3 different names, the next one only 2 and another one can have 6.

This causes a problem regarding the manipulation of the data.

Right now I have 10 columns "name 1" "name 2" .... and only those who need to be filled are filled. I can't however efficiently manipulate the data. For example, George could have been entered in "name 1" for the investigation 1 and in "name 2" for another investigation. Using a pivottable, to track George I'd have to select him in all 10 columns.

I could maybe
- Write all names in 1 cell, separated by something and use somemorething to virtually split that
- Write each name in a row below, with the other characteristics copy-pasted (although then if I have 2 names and thus 2 rows, Excel will consider I have 2 different investigations).
- ???

View 2 Replies View Related

How To Combine Data From Multiple Columns Into One Column

Mar 17, 2014

I am trying to combine data from multiple columns into one column. The way my data is set up there shouldn't be any columns that have data in the same row. See below for my example.

[IMG][/IMG]

View 9 Replies View Related

Extracting Data Based On Other Columns Data?

Nov 18, 2013

My query is , I require the UCF column for the ID having maximum number (last five digits) of UCF column for the respective year column values

IDUCF Yr
559589876543212610007971212
559589876543212610000333712
559589876543213610004703013
563829876543212630000323912

My answer should be like below (or) having an additional column saying Active/Inactive.
IDUCF Yr

559589876543212610007971212
559589876543213610004703013
563829876543213630004703113
563829876543212630002782312

View 1 Replies View Related

Combine Two Columns Based On Name / Number And Score

Feb 19, 2014

I have three columns in the spreadsheet.

sheet1

A BC
Santhosh314
Praveen224
Praveen012
Praveen37
Santhosh38
Praveen120
Praveen036
Santhosh19

In another sheet (sheet2) output come like this.

A B
Praveen 3/7
Santhosh 3/8

View 2 Replies View Related

Excel 2007 :: How To Combine Data Elements Into Single Data Object

Sep 23, 2011

I am building a rather good size userform. It is getting really lengthy code-wise because I want certain things to be enabled and disabled on the form as they click on certain options.

I know I can hard code the lines but so I am trying to come up with some coding elements where I will not have to add 20+ lines of code for everytime I want to add a new feature.

Here is one of the functions that I have, There is going to be several of these:

Private Sub chkMore2_Click()
If chkMore2 = True Then
cboProtocol2.BackStyle = fmBackStyleOpaque
cboApplication2.BackStyle = fmBackStyleOpaque
txtLowPort2.BackStyle = fmBackStyleOpaque
[Code] .......

So If I click chkMore2 ... all of the 2nd elements will be editable. If I click chkMore3 ... then all of the 3rd elements will be editable, etc. etc.

So I tried to play with this code example:

Private Sub CheckBox1_Click()
If CheckBox1 = True Then
Call Changeit(1, "yes")
Else
Call Changeit(1, "no")

[Code] ........

Excel 2007 does not like the .concatenate element.

View 1 Replies View Related

Enter And Highlight Data In Columns Based On Other Columns

Jul 10, 2009

I have a worksheet with 20+ columns. For this macro, I only need to focus on 4 of them. However, none of these columns are ever in a fixed position so the macro would need to find them by name and NOT by column position. Here they are...

1. Vacation Type (will only have a text value of either "Cold" or "Warm")

2. Vacation Started (will always have a date *x/xx/xxxx)

3. Vacation Ended (sometimes it will have a date '*x/xx/xxxx' and sometimes it will NOT have a date and will be truly blank)

4. Number of Days (currently has ALL truly blank cells)

THIS WHOLE MACRO SHOULD NOT BE CASE SENSITIVE ANYWHERE

Here's what I would like the macro to do...

Scenario 1 - for "Cold" values Find "Cold" text values in the "Vacation Type" column

"Cold" values WITH a date in the "Vacation Ended" columnIF there IS a date in the "Vacation Ended" column in the same row, put the number of days difference between the "Vacation Started" column and "Vacation Ended" column in the "Number of Days" column.

The amount of days in the "Number of Days" column will determine whether these cells should be highlighted GREY or RED.

Scenario 1-AIF the number of days difference is 7 days or less, highlight the cells in the "Vacation Ended" column and "Number of Days" column RED.

OR…
Scenario 1-BIF the number of days difference is MORE than 7 days, highlight the cells in the "Vacation Ended" column and "Number of Days" column GREY..................................

View 2 Replies View Related

Colour Columns Based On Data

Apr 13, 2013

I have a sheet (calender month) with week number in the top row, date on the second and weekday on the thirdh.
Is there some code that will change the background colour of the entire column when the weekday say's sa or su (saturday/sunday)?

I could do it manually but every year the first of januari starts on a different day and I would like to automate it.

View 9 Replies View Related

Average Based On Data In Two Columns

Dec 30, 2008

I am trying to include numbers in an average if two separate columns prove true. For example, I want to include all numbers in column "C" in the average if the cell in column "A" matches a name and the cell in column "B" is equal to the number 1.

View 2 Replies View Related

Remove Empty Rows Based On Range Of Columns If Columns Are All Empty (no Data) Delete

Oct 24, 2012

Using the following code to remove empty rows based on whether a specific range of columns is empty. The code works if the cell has a zero, but not when the cell is blank. An example of the data is attached.

VB:
Public Sub DelRows2()
Dim Cel As Range, searchStr, FirstCell As String
Dim searchRange As Range, DeleteRange As Range

[Code].....

View 1 Replies View Related

Delete Rows Based On Data From Two Columns?

Sep 21, 2012

two things on the attached sheet.

First problem: in column B, I have a formula based on contents of column A. However, the limitations of 7 nested IFs leaves me with errors - I need 3 more IFs. Is there a way around that?

Second problem: I need to show the row of the first (earliest time in column A) and the last (latest hour in column A) record for each name. I've been sorting by name and time, then manually deleteing the rows I don't need. I know there's a better way, but I can't find it!

View 6 Replies View Related

Sorting And Retrieving Data Based On Two Columns?

Oct 19, 2012

I am working on a new budget spreadsheet that I am creating. I want to accurately calculate credit card expenses. As everyone who has a credit card knows, charges made this month are not due to be paid until next month. To make matters more complex, charges made from (for example) January 20 until February 19 are not due to be paid until March 20. With that in mind, I created a spreadsheet with a different tab for each month. Each tab has a place to put in all expenses. Here is an example:

date
Category
Expenses
Remarks

[Code].....

Obviously, The above example is from January. IN the February tab, I want to calculate everything in the "Expense" column that has a date in the "Date" Column before Jan 20 and where it says "Kohls - Frank" in the Category column. Of course, in the March tab, I would need to grab all of the "Kohls - Frank" expenses after Jan 20 from the January tab, and everything before Feb 20 from the February tab.

I figured out how to add up everything with the following formula: =SUMIF(Jan!A:A,("<="&DATE(2013,1,20)&E32),Jan!C:C) How can I filter on the Category tab?

View 1 Replies View Related

Average Numbers Based On Other Two Columns Of Data

Jan 23, 2014

I have three columns of data, one containing numerical values. I want to average the numbers based on the other two columns of data. Attached is an example file with the desired output I'd like. What is a formula that will do this?
AverageExample.xlsx

View 7 Replies View Related

Merge Based On Columns If There Is Duplicated Data?

May 19, 2014

I have a large volume of data and i need to manage and organize somehow.

Example:

A B C D E
CHRIS AN204 2005 Apple Green
CHRIS AN204 2005 Apple Red
CHRIS AN205 2005 Apple Yellow
TOM AN204 2006 Apple Green

This should look like this

A B C D E
CHRIS AN204 2005 Apple Green, Red
CHRIS AN205 2005 Apple Yellow
TOM AN204 2006 Apple Green

I manage somehow to find a VBA code that will merge my rows, but it's not working as it should. It's losing data.

Also in a cell it can happen to have more than 255 characters.

View 1 Replies View Related

Delete Rows Based On Data In Two Columns

Mar 18, 2014

I have a spreadsheet with hundreds of rows. Columns C and D contain either TRUE or FALSE. I want to be able to automatically delete the rows where both columns are FALSE.

View 1 Replies View Related

Hiding Columns Based On Other Column Data

Feb 27, 2008

I'm trying to hide columns based on information in another column. If that column contains "A" or "B", hide columns "U" through "W". If it contains "A", "B", "C", or "D", hide columns "V" through "W". Etc, etc., so on and so forth...

I've snipped the code I found earlier and modified it to (what I thought) was correct for my application, but it doesn't seem to do anything. (btw, should I get an error if it doesn't run correctly?)

Here is the code as modified:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "P:P" Then

If LCase(Target.Value) = "A" Or LCase(Target.Value) = "B" Then

Columns("U:W").EntireColumn.Hidden = True

ElseIf LCase(Target.Value) = "A" Or LCase(Target.Value) = "B" Or LCase(Target.Value) = "C" Or LCase(Target.Value) = "D" Then

View 9 Replies View Related

Column Availability Based On Other Columns' Data

Jun 7, 2007

In the sheet I'm currently working on I have a column (column C) that uses a validation so that users can select from a number of call types (data tracking in a call center). I allowed for an "Other" option, with a free-form column (column D) dedicated to the "other" reason in case the list doesn't cover the type, but I'm running into a problem where people use the other column to describe call types already listed. Is there anyway to lock the Other column (column D) unless Other is selected in the drop down in the Call Type column (column C)? The sheet I'm working with contains confidential data so I can't post it, but if this isn't clear enough I can draw up a mock sheet.

View 5 Replies View Related

Deleting Rows Based On Columns Data

Jul 2, 2007

I'm trying to write a macro that will look at a table of data, and if column J is blank, it will delete the entire row and shift the data up. Also, if there is a "C" in column C, it will delete that entire row as well. I tried the code below, but for some reason it is not deleting all of the rows that it should. Is there some kind of problem with the code that I'm not catching? It looks like it should work perfectly...

View 9 Replies View Related

Categorizing Data Based On Color Then Split Into Columns?

May 15, 2013

I have one column of data which I need to split into two. Those values that are bold need to migrate to column B. Have some difficulty in phrasing the question properly.

Original:
A
10
0
0
2
4

Desired output:
A B
0 10
2 0
0 0
2 0
0 4

* note a few formatting issues here:
1. instead of bold and not bold, they are in green or in purple
2. 0 stands for an empty cell in my data set (I tried to fill the empty cells with zeros, but they somehow inherit the colors, i.e. some zeros are green and some zeros are purple; guess that wouldn't be a problem since the desired output they'll all be zeros anyway?)

View 5 Replies View Related

Auto Populate A Third Cell - Based On Data From Two Columns

Mar 24, 2013

I have data in three columns

A B C
4.5 9.50 4.657
4.5 11.60 4.789
4.5 12.50 4.654
4.5 13.50 3.930
4.5 15.20 3.826

I need to be able to auto-populate the cell in column G based on values in columns A & B. If I type 4.5 in E2, and 13.50 in F2, G2 should auto-populate with the value from column C

E F G
4.5 13.50

View 2 Replies View Related

Split Data Based On 3 Columns Into Separate Worksheets?

May 22, 2014

I need to split the data into worksheets (see attached) by the Advertiser column and then by the deal year and deal code columns. I need each worksheet to be named per advertiser and deal year_deal code. I took off and replaced the data since it is sensitive information.

creating a macro or implicating one into the workbook to run for future reporting.

View 13 Replies View Related

Changing Column Data Based On Another Columns Focus

Mar 4, 2014

I have 1 sheet called Setup which users enter their character name, their class, and their race, additionally the entire workbook manages data for up to 9 individual characters.

On another sheet called C|R|E, I have tasks listed that are based on each class type and each race type that are available. Currently there are nine classes and four races. Currently on this sheet each class and each race has its own individual data lists and such, and formulas are done in a way that user inputted data can be entered anywhere, but wont count unless the class and race match those selected on the Setup sheet. To keep the sheet short in appearance I used command buttons to hide/unhide classes or races not in use by the user.

What I was wondering is (and this could be hard to describe), can data in one column be changed to reflect data based on another column's focus? I will explain in more detail.

Column B contains the task information for each Class and Race. For example Cells B13-B51 for one class, Burglar. Columns D-L is where users enter data to show if the task is completed or not. In this example lets say the users first character listed on the Setup sheet is a Champion. What I want to do is check the Setup sheet Char 1. Then based on what Char 1 is selected as on the Setup Sheet, C|R|E B13-B51 data is changed to reflect it, IF Column D currently has focus. If Column E gets focus then B13-B51 changes based on the class selected on the setup sheet for character 2. and etc.

If this can be done I can remove the 13 different sections and have it down to 2 sections, one for class, one for race. For now I am using check boxes to hide classes and races they are not currently using, but would like to move all classes into one table and all races into one table to they dont have trouble with columns they have to skip over currently.

This is a sample of how I am currently working on the C|R|E sheet, the full code is much much longer since I am using so many command buttons.

View 1 Replies View Related

Trying To Build A Macro Filter Based On Data In Either Of Two Columns

Jul 31, 2008

I created a contact list that incorporates buttons at the top of the page to sort the data based on two customer type columns (thanks to Richard for help getting this far!).

I am attaching the file so that it will be easier to take a look. Four of the five macros are working fine but the second one ("All Clients") filters on the premise that "yes" is answered in either of the two customer type columns. In other words I am trying to show the records that have "yes" entered in either of these two columns, not necessarily both columns.

View 9 Replies View Related

Group Columns Of Unsorted Data Based On Key Table

May 1, 2008

I need to create a vba macro which will sort data according to a code it is denominated by and then will apply specific values from a code key to the data. I really need to have some help with this as although my vba is getting a bit better this is definately beyond me.

View 3 Replies View Related

Calculate Mode / Median And Average Based On Data In 3 Columns

Aug 1, 2014

It's probably best if you open up the attached example spreadsheet that contains sheets "Before" and "After" otherwise it might be pretty difficult to understand what I'm talking about.

So I have this spreadsheet where I have part numbers in column B, status of the orders in Column I and lead times in Column M. What I want to achieve is to get of Mode (col N), Median (col O) and Average (Col P) values of each part number and each of its status using the lead times in Column M. If possible I would only like this on the top lines of each of these. I have done the formulas manually on sheet After so if you click on the formula you can see the range's it covers.

I did create a concatenation in column K (conc of column B and I) as helper column because in theory this might make things a little bit easier.

Now going into second part. I would also like to do something very similar but only using the part number and status "Finished" and get the values in columns T,U, and V on the top row of each part number. I made some blue boxes and arrows to kind of point out the idea.

The solution can be either formula based or macro, it really doesn't matter, however I will intent to use it within macro either way.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved