Record Duplicate Values Based On Multiple Conditions Only

May 1, 2014

I am trying to pick out certain bits of information from the below "example" set of data:

A
1

A
1

B
1

C
1

[Code] .......

My aim is to record the letters that are recorded against both numbers (note: in my data there are more than 2 sets of numbers). For the example above the solution would be:

A
1,2

B
1,2

...because these two letters appear against both 1 and 2.

There are some letters that are duplicated against the same number which is making it hard for me to work out. I don't care if the same letter appears against the same number, I just would like to know instances when a letter appears with a different number, and if possible what that number is.

View 3 Replies


ADVERTISEMENT

Count Number Of Unique Values Based On Multiple Conditions

Feb 22, 2011

I'm having a problem with a spreadsheet in Excel. I have in column terras, codti problem and several cells that are repeated. I'm stating that terra appear only once, the information in column each issue should appear in different columns with the sum of how often they appear and codti according to terra.

In excel is best illustrated what I mean!

In total, 5267 lines and need to do this with all. You can do this in excel?

View 4 Replies View Related

Finding Duplicate Rows Based On Values In Multiple Columns?

Mar 28, 2014

I have a data set which has 6 columns (and lots of rows). Every row is different but I want to aggregate them based on 4 fields and then find the average of the numerical column for the results. I basically want to Group based on 4 fields and find the average of the 5th field.

My initial approach was to introduce a column which is a combination of the 4 fields I want to group by, simply in the Excel file (=A2&B2&C2&D2) and then find duplicates of that. I have a solution for this in VBA but when importing new data sets in this method is very slow, so I want to be able to do the whole thing in VBA.

View 9 Replies View Related

Excel 2010 :: Pulling Data Based On Multiple Criteria With Duplicate Values

Mar 14, 2012

I have a sheet (see Sheet 1) from a report we run which lists the following information: Personnel Number, Amount, Wage Type. This is generated for 1000's of employees, with each personnel number being repeated several times in column A.

I am trying to pull specific data to another sheet (see Sheet 2), which would ideally generate the sum of "Amount' for a specific wage type for each personnel number. The issue is is that there may be dplicates of the wage type for each ID number (which is also repeated).

For example, the total salary amount on sheet 2 for ID#12345678 would be 0, while for #9876543 it would be 1250. Is there a formula I could use on sheet 2 column B that would generate this?

Excel 2010 ABC1Personnel NumberAmountWage Type212345678550Payment312345678400Overtime412345678300Overtime512345678250
Payment612345678750Vacation798765432800Salary898765432250
Payment998765432100Overtime1098765432450Salary1198765432300Overtime
Sheet1

Excel 2010 ABC1Personnel NumberTotal SalaryTotal Overtime212345678398765432
Sheet2

View 3 Replies View Related

Multiple Identify Duplicate Conditions

Aug 27, 2012

I have a spread sheet in which an account number is located in, lets say, column A. There can be multiple duplicate account numbers here, and thats ok.

However, there is another column, Col. B, which has the name of an action. There are multiple "actions" listed, but the each action can only occur once for each account number. I need to identify if an account number is duplicated and if so, does it have any duplicate values in B. If it does, highlight the duplicates.

View 1 Replies View Related

Removing Duplicate Data Based On Conditions

Oct 10, 2011

Currently trying to solve a niggling issue with removing duplicate row data from competition entry databases using the following code...

Code:
Sub remove_duplicates()

Dim lastrow As Long
Dim i As Long, j As Long

On Error GoTo errhandler

Columns("A:G").Sort Key1:=Range("A2"), Order1:=xlAscending, Key2:=Range("B2") _

[Code] ......

errhandler:
'MsgBox Err.Description
End Sub

What I need to happen is for duplicates to be based on both the name and email matching (columns A + B) and then remove all duplicate rows, whilst ignoring but preserving the content in columns C,D,E and F on those rows that remain. Column G contains either "Yes" or "No" depending on a users membership status. Sometimes duplicated data will contain identical name and email address but have different membership status in column G where someone was logged in when submitting a form the first time, and then logged out the next (potentially a mixture of the two over multiple times). Therefore I need any duplicate users who have different values in the G column throughout the database to be detected by the macro and we must ensure that the single row retained in the final non-duplicated list displays "Yes" in column G for that user.

Duplicate users who are always "yes" or always "no" work fine, its only the ones with mixed values for column G that need to be analysed and their return forced as Yes in the final list.

The final list should preserve the original column structure and thus be only one row per unique user.

The above code appeared to work the first time with a sample file, but when running the macro on one of my full size lists (3k - 5k rows) it returns 2 rows for each user who started off as a mixture of Yes/No... ?

Both rows will say yes in column G (so that part is correct!) but I have to re-run the macro again on the same dataset for it to remove the duplicate yes rows to get the list as it finally should be!

So I can achieve the result by running it twice, but this is a bit of a cheating way to do it and also the next stage after this involves something similar across multiple worksheets so I need something rock solid to build upon!

View 5 Replies View Related

Match A Cell Record To Several Conditions

Dec 3, 2006

How do I express in a formula if ce406= any one of the following results, then Yes, if not then No:

1 2 1 1 1 2
1 2 1 1 2 1
1 2 1 2 2 2
1 2 2 1 1 2
1 2 2 1 2 1
1 2 2 2 2 2
2 2 2 1 1 2
2 2 2 1 2 1
2 2 2 2 2 2

I tried the following formula, however, it did not give the desired result: ...

View 9 Replies View Related

Duplicate Record Within 1 Year

Nov 6, 2013

I have data like this (with many more rows).

Date
Employee #
Employee Last Name
First Name
Department
Style
Size

[Code]...

I'm trying to set up a conditional formatting rule that looks through the list of employee numbers for duplicates. If it finds a duplicate AND the duplicate record has a date that is within one year of the previous record for the same employee number, highlight that row.

In other words, every time a record contains an employee number (column B) that is the same as a prior record, and the date of the second record is within 1 year from the first, that should present a TRUE to the conditional formatting. Otherwise, result should be FALSE.

Either any conditional formatting rule, or even set this up in column H to provide the TRUEs and FALSEs, I should be good to go.

View 2 Replies View Related

Selecting Values Based On Conditions

Jul 18, 2009

find a book with two sheets. One contains data and the other is the report that I must generate. In sheet one ull find the list of all the trucks received.

I would like to see all trucks that I have received in the month of say June in the report sheet as per its arrival date when I change the month on the top of the report.

View 2 Replies View Related

Sum Values Based On Two Date Conditions

Feb 19, 2008

I want to populate two cells (the yellow ones) with the start and end date values from the row where a match is found in the 'period' column for the value in the left-hand green cell and in the 'week' column for the value in the right-hand green cell. Is anyone else on the board firing on all/most cylinders today?

View 5 Replies View Related

Sum Based On Multiple Conditions

Aug 28, 2009

I am trying to sum numbers based on three counditions.

My problem the third condition needs to use a wild card. I have attached a sample file, in the last condition I am only wanting to sum numbers where the characters in the last column begins with bd*

The yellow cell contains the formula I am using.

View 4 Replies View Related

Counting Unique Values With Multiple Conditions

May 7, 2014

I need counting unique values with a number of given conditions. I need this to be a formula so that I can just add data to my spread sheet and it will automatically calculate.

The formula I have is:
SUM(IF(FREQUENCY(IF(A:A=Z1,IF(B:B=Z2,IF(C:C>Z3,IF(D:D<=Z4,G:G)))),G:G),1))

The goal is to count all of the unique value in column G:G that meet certain criteria (have ending times greater than Z3 and beginning times less than Z4, etc.). Once I get the formula to work, I'll simply drag it down to have it calculate for similar lightly changing criteria (like different beginning and ending intervals). However, the formula doesn't seem to be working. It's only giving me zero values (I have "ctrl-shift-entered").

View 9 Replies View Related

Averaging Values In Multiple Columns With Conditions

Dec 18, 2013

I am a teacher creating a grade book in Excel. Each student is in a single row, with columns for the various assignments. For data analysis purposes, I am trying to develop formulas to make two different calculations.

The first calculation is simply the average quiz grade for all students, for all quizzes.

The second calculation is the average quiz grade for all grades that are higher than zero. This will tell me the average quiz score for quizzes that have actually been attempted.

I do need to track students that have withdrawn from the class, so column A will contain the letter "w" if the student has withdrawn from the class. If the student has withdrawn, the grades for that student should be ignored in the calculations.

Since I do accept quizzes after their due dates, a particular quiz score will have an entry of "L" if it has not yet been taken. These entries also need to be ignored in the calculations.

See the attached workbook for some sample data and the expected results.

Sample Workbook.xlsx‎

View 4 Replies View Related

Counting Unique Values With Multiple Conditions

May 7, 2014

I need to count unique values with a number of given conditions. I need this to be a formula so that I can just add data to my spread sheet and it will automatically calculate.

The formula I have is:
SUM(IF(FREQUENCY(IF(A:A=Z1,IF(B:B=Z2,IF(C:C>Z3,IF(D:D

View 9 Replies View Related

Finding Current Duplicate Record?

Apr 21, 2013

I have a spreadsheet to track events (servicing, repairs, fuelling, etc) for my car - dates in Col A, events in B, mileage in C, prices in D.

I want to return the mileage when the next service is due, based on the mileage of the last service. Using VLOOKUP set to FALSE returns the first service mileage; set to TRUE, it returns random values. The events in Col B repeat in a random order (e.g. fuel, fuel, service, fuel, repairs, fuel, fuel, service).

View 4 Replies View Related

Summary Of Numerical Values, Based On Several Conditions

Oct 16, 2008

I am trying to do is a summary of numerical values, based on several conditions.

column a column b column c
local loop live cross connect
loop A cancel 100
long haul live 10000
long haul pend canc 1000
loop Z live 100
x-conn live cross connect


In column a, i have several choices and i want to focus on those choices that fall into column B "live" or "pend canc" and then only have numerical data in column C

I've tried several different formulas like

=SUMPRODUCT((a30:a38="Loop A")*(a30:a38="Long Haul")+(b30:b38="Live"),cX30:cX38)

I know the result of this should be 111000 but it's not working...I usually get n/a. I know about using cntl-shift-enter to use the formula properly.

I can get one variable to sum up properly using =SUMIF(M9:M21,"Live",BW9:BW21)

but, that leaves out anything that is pend-canc

I have also tried =SUM(IF((a9:a21="long haul")*(b9:b21="live"),cX9:cX21)) which gives back a value that is accurate.....

View 8 Replies View Related

Return Values From Tables Based On Conditions?

Aug 22, 2013

how to return values based on some conditions.

So for the sake of this example i have two cells lets call them J1 & J2 , one with the client name and another with State (matches the table name)

How can i get it so when i type in say Client 1 & Table 3 it will return the information in client 1s column into table 1s rate column. Obviously i want to be able to type in any clients name / table and have the same thing happen.

the red is what i want returned into table 1s rate column

Table 1
Table 1
Table 2
Table 2

[Code].....

View 1 Replies View Related

VBA To Set Cell Value Based On Multiple Conditions

Jan 4, 2013

I am creating a document log that tracks all excel files sent and received.

I use RDBmerge to get the filenames and data from the file batches.

My current macro edits the data down to the last stage of data needed to create the log.

My example workbook shows the final stage of the RDBMerge Data "Rough_Data" and then the final data formatted needed for the Log "Final_Data"

Included on the "Rough_Data" worksheet is the Code log used to complete the "Final_Data" worksheet.

I have highlight the cell range on the "Final_Data" Sheet that I need to complete.

filenames can occur multiple times from the RDBmerge, so only one occurance of the filename is place in column B of the "Final_Data" worksheet.

The criteria is this:

A column on the "Final_Data" worksheet as been Named for Each of the possible "Record Types" from Column G of the "Rough_Data" Worksheet. ("A,B,C,D,E,I,O,P,Q,T,V,W,X,Y")

I then must look through the "Rough_Data" worksheet for the first occurrence (if any) of that record type for each filename on the "Final_Data worksheet. If an occurrence is found I then must look at the "Unique ID" & "Program" Columns of the "Rough_Data" Worksheet. The key (on the "Rough_Data" worksheet) is used to determine the code that is written to the corresponding cell.

i.e.
"Final_Data"Date
FileName
Field2
User
Direction
Method

[Code] .....

I would very much like to automate this process, as sometimes I am dealing with over a hundred files with 30 plus rows of data each.

View 9 Replies View Related

Summing Based On Multiple Conditions

Feb 11, 2010

I have been trying to search an array and cannot find the correct combination of functions to get the information I want. I might need a macro to do this but I will try anything. Here is an example:

1 A 1
1 B 2
2 A 3
2 B 4
3 A 5
3 B 6

I want to search for 3 and A and return the value in the 3rd column. I have tried several functions but cant figure out how to make sure I get the correct value in the 2nd column that corresponds to the value in the 1st column.

View 14 Replies View Related

Cell Value Based On Multiple Conditions

Feb 23, 2010

I need to create a macro that will calculate a value based on the contents of multiple cells. Looking at the example attached, if columns A and/or B (employee ID and name) are empty, then allowable OT (G) should be 0. If either have data, then if Stage (F) is CAN, G should be 20. If Stage is FAS or FAR, G should be 10.

I'm not very savvy with IF statements, which is how I imagine this can be done, and I don't know if this would be easier to do as a macro or as a formula within G. Since the contents of the of the cells will be changing on a weekly basis, I'd prefer the formula to only be there if there is content on the line, so we don't have nulls showing.

View 7 Replies View Related

Average Based On Multiple Conditions

Dec 1, 2009

Im currently trying to report on cycle times for a certain task that is carried out on a daily basis. I have used NETWORKDAYS to calc each rows cycle time in Cell R14:R512 the code is:-

=IF((NETWORKDAYS(O14,N14)-1)*($AH$11-$AH$10)+IF(NETWORKDAYS(N14,N14),MEDIAN(MOD(N14,1),$AH$11,$AH$10),$AH$11)-MEDIAN(NETWORKDAYS(O14,O14)*MOD(O14,1),$AH$11,$AH$10)=0,"",(NETWORKDAYS(O14,N14)-1)*($AH$11-$AH$10)+IF(NETWORKDAYS(N14,N14),MEDIAN(MOD(N14,1),$AH$11,$AH$10),$AH$11)-MEDIAN(NETWORKDAYS(O14,O14)*MOD(O14,1),$AH$11,$AH$10))

This is returning the cycle time providing both the start date/time and end date/time are filled in, or it returns blank if nothing has been filled in. I have then tried to calc the average overall cycle time in Cell R12 by using the below formula = SUM(R14:R513) / (COUNT(R14:R513) - COUNTIF(R14:R513,0))

This seems to be working proved i have two rows of data filled in. My problem lies when all the cells are blank, it then returns the DIV error. I have tried using an if statement to ignore if the cell is blank but it still returns the DIV error. Im really at a loss on this and now im not even sure if i have gone about this in the right way or if there is a better way to approach the whole task? I have attached a sample workbook to try and better explain.

View 4 Replies View Related

Summing Values From Array W/ Multiple Conditions-cols

Oct 1, 2007

I know there have been many posts about multiple conditions in arrays, but I didn't find one that applied to my situation, so I'm hoping can help me out of jam. I'm using Excel 2000 on XP.

I have a database of sales information. Customer name is listed in column C, and columns F through Q contain the sales for the months of July - June (fiscal calendar year), with the headers for the months in row 4. There can be many rows of sales for the same customer, hence the need to sum them.

Example

C F G H
CUSTOMER JULY AUGUST SEPTEMBER
customer1 2 3 4
customer1 2 3 4
customer2 2 3 4
customer2 2 3 4

The problem is that this information will need to be updated every month to reflect sales year-to-date, meaning that the conditions for summing the data will change depending on how far into the year we are. So for instance, in August I will need to sum all the records for customer1 in the July column (column F) and the August column (column G), but next month it will have to sum the records for customer1 from July, August, and September (col H).

The result of this information would be displayed on a different worksheet. My thought was to assign a range of 12 cells (Sheet2!A1:A12) and to populate those cells with any of the months that need to be summed thus far. So for example, through September, A1 = "July", A2 = "August", and A3 = "September". Then the formula would use those values to evaulate the conditions. So in plain English the formula would:

sum the values in columns F : Q where the monthly header = the values in the range Sheet2!A1:A12 for all records where CUSTOMER = CustomerName

View 9 Replies View Related

Extract Cell Values By Conditions From Multiple Worksheets

Jun 25, 2008

I am trying to write a Macro that would go into same specific cells in multiple worksheets and paste the data into one summary worksheet if ofcourse a criteria is met.

The multiple worksheets have the same format. The worksheets are numbered 001, 002, 003, 004, etc (increase on a daily base) ..

View 3 Replies View Related

Merge Duplicate Records In Single Record

Oct 16, 2008

Through a query I extract data from an oracle database. This database creates a record for every unique Article_Batch_Pallet_Faultnumber combination. Through a filter macro I create a new format on a different worksheet which creates a record for every uniqe Article_Batch_Pallet combination. I need a searchfunction to get the faultnumbers in the same row.

View 2 Replies View Related

Flagging Duplicates Based On Multiple Conditions

Nov 8, 2008

Flagging Duplicates based on Multiple conditions..

I have attached the file for reference with Dummy Data as the actual data runs in thousands...

What I require is to flag Duplicates with some formula so that I can filter and then later delete those specific rows from the records...

The Duplications has to be considered on Multiple criterions:
1. If the FNAme and LName is appearing for one Company more than once.

2. Sometimes there would be inconsistency in Data Entry, so the FNAme would be typed in the Column for LName and vice-versa.The code needs to understand the same.

3. Alongwith the above, if the Designation is different then the record with the Lower Designation based on the Weightage should be Flagged as "Duplicate".
Ex: -

4. If there's a tie between the same designation then the record with the Maximum information across all the columns having Max info should be Unique.
Ex:- The amount of details mentioned in the following columns would determine the record to be termed as Duplicate or unique

5. If still the records are identical then the first occurence can be unique...

I have made this data to give an example as the actual data is very confidential.

Please allow room for adding New Designations as the Designation and their Weightage needs to be Dynamic.

Please refere the Word doc Duplication Criterion Explanation for the explanation.

View 14 Replies View Related

Lookup Unique Based On Multiple Conditions ...

Jan 2, 2009

I am looking for a solution other than using an advanced data filter for unique records only.

I would like to take a large list (columns A:D), and automatically filter for unique records and other conditions and paste the results in different tables (Group A & Group B).

Group A only includes records with value ="A" in the checksheet column.
Group B includes records with value <>"A" in the checksheet column.

Does anyone have any ideas how to do this so that when I paste the large list in columns A:D, the other tables (Group A & Group B) are automatically populated?

SEE ATTACHED:

View 9 Replies View Related

Counts Info Based On Multiple Conditions

Feb 22, 2009

I am trying to get a list which counts info based on multiple conditions but I can find no way round this one point

I have a sheet which has all the games played in a particular division and the time that each goal was scored and I am trying to break down the following

What I want is a list that has a column that has the result of how many times when team A were playing at home was a goal scored between the 45th and 65th minute


column A = Home Team
B=Away Team
C= Time of First goal
D=Time of Second goal
E=Time of Third etc

I have a countifs in place for counting the home team and counting if the first goal was scored in under 10 minutes (this is simple as obviously all the first goals are in column C) but what I want to do is be able to have a count of how many times a goal was scored between x number of minutes eg between 40-50.

My problem comes when trying to count the goal times as some matches will have no goals and the cells will be blank and others will have multiple cells filled and the figure I want could be in any column and I also only want it to count only the amount of games a goal was scored between those times so if a game had 3 goals scored in between that time I only want it to count 1.

The sheet has a lot more columns but this is the main sticking point.

View 10 Replies View Related

Finding Information Based Upon Multiple Conditions

Mar 23, 2009

I want to populate separate tabs from data in a master table based upon multiple conditions shown in the separate tabs. Each tab is a summary of a particular engineer's shifts over multiple weeks and their results on various projects. Each summary tab has the engineer's name and the number of the week (the two conditions). Example: On Aaron's tab, I want to show a summary of Aaron's work and his results over a period of several months, as well as who is working the other shift on that day for those projects. So I need to get the following information for Aaron's tab from the master table:

Week 1, Aaron is working the morning shift and Zeb is working the afternoon shift,
Week 2, Bill is working the morning shift and Aaron is working the afternoon shift
Week 3, Aaron is working the morning shift and John is working the afternoon shift
etc etc

I also need to know how much work each engineer pairing has achieved in a particular week on a particular project. The engineer working in each shift may vary from week to week, as will their results. There is no formula for when a particular engineer will be working either morning or afternoon or whom they will be working with.

View 5 Replies View Related

Match Function Based On Multiple Conditions In VBA

Jun 7, 2013

I am trying to write a code in excel vba where I need to match specific text in multiple columns and if text is matched then I need to insert new blank column after the specific text.

My code is like this.

Dim Col_num As Integer
Col_num = Application.WorksheetFunction.Match("Customer Defined 06", Range("6:6"), 0) + 1
Columns(Col_num).Select
Selection.EntireColumn.Insert
Cells(6, Col_num).Select

This code is working fine in single condition but when I enter another condition then its giving me an error i.e Type Mismatch.

View 9 Replies View Related

Delete Cells Based On Multiple Conditions?

Jul 16, 2013

I'm trying to remove cells that contain certain suffixs. Here is the code I'm trying to use:

Code:
For i = 7 To 2000
If Cells(i, 7) = "IV," Or Cells(i, 7) = "Jr," Or Cells(i, 7) = "III,"
Then Cells(i, 7).DELETE Shift:=xlToLeftEnd IfNext i

but it does absolutely nothing. I've used this for similar macros in the past and it worked just fine.

View 4 Replies View Related







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