Find Discrepant IDs Based On Range Of Values In Each ID Row

Jun 12, 2014

I have a workbook with three sheets containing patient information from a clinic. Each sheet pertains to a different year. The sheets are formatted such that every row of each sheet contains a patient ID number in column A; in the same row, following the patient ID, is data pertaining to that patient, part of which stays the same (intake data)[=values in columns B:O] and part of which changes (encounter data)[=columns P:AA].

My challenge in cleaning and merging this dataset is that the ID numbers may not be trustworthy: I need a way to validate that there are no patient records [=rows] such that a given row has the same set of identifying information (OpenRecord Date, Sex, Age, History, etc.) located in columns B through O but a different ID number (column A) in a different sheet. In other words, I need to make sure the same patient isn't masquerading by a different ID number across different years [=worksheets]. What I am trying to do is develop a macro or formula that compares each row's range of values for B:O to every other row across each of the three worksheets; then find and list only matches for B:O that do not have the same value in Col A.

Complicating this operation are two considerations: 1) Each sheet in the workbook (excerpt attached) contains about 40,000 rows. 2) DOB is missing; instead, we have "Age." For those patients which appear in all three years captured in the three sheets, the "Age" value (column F) increases by +1 year.

A link to an example file on Google Drive : [URL] ....

View 2 Replies


ADVERTISEMENT

VBA - Copy Range With Multiple Same Values Based On Other Cell Values

Aug 31, 2012

I want to build a database where the user can select a specific time period. I have a static file with the time periods and the related values. For instance I have in column A1:A15 the time periods from January 2011 to Dezember 2011, but I have some dates multiple times as there are more values attached to it. For instance I have in the first 4 rows January 2011...what I want is when someone puts in the value January 2011 in cell B1 and Dezember 2011 in cell B2 that the whole static file gets copied to another location (including the multiple dates) displaying the chosen time period. Similarly if someone puts in the value March 2011 to November 2011, I want only those values to be copied.

View 4 Replies View Related

Find First And Last Values Based On One Value

Feb 18, 2004

I need to find the First value and the last value of a range. A value is put into cell C12: number 1 for example and what happens is that excel will go down range H2:H9 and find the First Depth - "0" in this case and the last Depth 100 ......

View 9 Replies View Related

Insert Row (Based On Values In Range) With Sum Of Values For Other Columns

Apr 21, 2014

I have different reports, some have fifty transactions, others have thousands. My goal is to: Insert a new row every time the values in the "Account" column meet a certain criteria, AND THEN add the totals for the Debit and Credit Columns.

Let's say I start with a table that looks like this:

A
B
C
D
Dept
E
Account
T
F
F2
G
Debit
Credit
Total

33010

[Code] ....

I want to group the first four rows because Accounts 33010 and 33015 are in the same department. Same with 50050 and 500060. I want to then insert a row below the last row with "33015" as its Account #. And add the values for Debit and Credit. It'd look like this:

A
B
C
D
Dept
E
Account

[Code] .........

Honestly, I have tried everything. Running a Macros with Relative reference does not cut it.

View 8 Replies View Related

Find Values In Range

Jan 11, 2007

I have a piece of code which, amongst other things, searches column A of one sheet for certain values and then pastes relevant data to a different sheet.

A lot of the data is fixed in relation to the entry in column A e.g. the 'Open Date' is always 8 rows down and 1 row across from the value I search for. These pieces of data easy to transfer to the other sheet.

However, one piece of data could be anywhere within a 10 row, 4 column region offset from the value in column A i.e. if column A is on row 12, then the data I am looking for could be anywhere in the range B20:E30.

View 5 Replies View Related

Find Top/bottom 3 Values From A Range

Aug 13, 2008

I now have everything set up to do exactly what I want except this last bit.

All I want is for the overview page to show the top three referrers for each month. At the moment, it's finding the top and bottom 'scorer' but if more than one has the same score I can only see the first alphabetically.

View 10 Replies View Related

How To Find 1 Value In Range Of Other Large Values

Mar 24, 2013

I'm looking for a formula that would tell me if a value in colume E can be found in column M while the values in column M may have characters before and after the value I'm looking for. The values are alpha and numberic in many cases.

Find E2 in M:M where E2 = 0123 and is in M:M as a15012388. The "yes/no" result is marked in red where I would like to have the answer.

Description
Looking For
Yes/No

[Code].....

View 4 Replies View Related

Loop Through Range Find Values?

Dec 6, 2013

I'm working with reports where I am given a list of used RFID tags which contain 13 alpha-numeric characters, and need to compare it against another list, in order to determine if any are matching. I'd like to be able to loop through one column of values to compare against the other, but unfortunately my VBA skills aren't that great..

View 5 Replies View Related

SUM Of Values In 1 Range Based On Specific Criteria In Another Range

Jan 31, 2009

I am tracking total man hours of contractors in columns of different rates applicable. At present I have structured my worksheet with the different rates across and days going down. As I am invoiced for a period of work I will log the invoice ref number in a separate field. I would like to sum totals to report against $ Invoiced and $ Committed (i,e worked but not actually invoiced against yet).

Here is an example of what I am trying to achieve. The Actual showing sum mhrs * rate only for the mhrs entries with an invoice in corresponding Invoice Ref Column. The Committed producing sum of all mhrs * rate [which I am using =(SUM(D9:D37)*D7)] regardless of what is in invoice ref column.

This way I can hopefully track what we have been billed and also what we can expect to have to budget for to cover what has been worked but not billed against.

View 9 Replies View Related

Find Difference In 2 Values Based On VLOOKUP

Jun 20, 2014

This is probably easier than I'm making it on myself. I would like a formula that would find the value in D2 of the current sheet on a sheet named 6-19 in D:D, then take the value from L:L in that row and subtract it from L2 of the current sheet.

I've attached an example workbook : Cost Calc Upload.xlsx‎

View 1 Replies View Related

How To Find Top 10 / Lowest 10 Values Based On Month

Jun 18, 2014

I have 4 grids on the trending tab. I want to find the top 10 highest Color assets from Fleet Volume -Color tab under the correct month.

So for example, if the month is May as in cell G3 on the trending tab, then look at the data under the month of May on the Fleet Volume-Color tab and find the top 10 assets and drop in the City, Address, Model, Serial Number and then volume to the 1st grid on the trending tab, then repeat for Highest B&W

I want to the do the same for each of the other 3 grids on this tab. I want this to update based on the month on both tabs.

Of course, the data on the Fleet Volume tabs is a small range due to size, the data is a lot larger.

Is there are way to do this with a formula? I tried Large and small formula but not too sure how to bring over the other data like City, Model etc.

View 4 Replies View Related

Find & Replace Values Based On Condition

Aug 21, 2007

I have a simple problem I am trying to find a set a values on a column and what to replace once found with the first 5 most left characters. Example:

in column A I can have text and numbers; the numbers that I want to find are in the following format xy:zw / xy:zw on each case the values can be from 0 to 9 so this is tons of posible combinations, I been trying to use **:** ? **:** but I don't get none. This is what I am doing

Set target = Sheets("Sheet1"). Range("A1:A9000")
For Each cell In target
If cell.Value = "**:** ? **:**" Then cell.Value = "00.00"
Next cell

A example would be 02:47 / 03:15 the next row could have 03:15 / 04:09
and so on however I could have text in some rows. In reality I would like to find and replace the cell.value with the Left 5 characters if the cell contains ANY value maching that format. Text in that column will never have that format combination

View 4 Replies View Related

Cut Range Based On Find

May 10, 2007

What I'm attempting to do is find the rownumber from 2 Cell.Find operations, and then basically cut (or copy) the range between the start row and end row. The cose I have worked out is:

Sheets("$$37073").Select
Range("A1").Select
Cells.Find(What:="#bale#", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
EndRow = ActiveCell.Row
Range("A1").Select
Cells.Find(What:="#bals#", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
StartRow = ActiveCell.Row

Now, I had hoped that to select the range I could just use: Rows("StartRow:EndRow").Select

However, I get a Mismatch (13) error with the macro, assuming at the run-time is trying to literally use "startrow:Endrow" as my range instead of pulling the values in the variables.

View 5 Replies View Related

Find And Replace Different Values In A Range Of Cells

May 8, 2008

I would like to be able to replace all cell values in a range of 20c by 20r (i.e. 400 cells). In all cases the condition would be the same (find all cells with a value greater than than zero), but then replace with different values.

e.g. Cells with value >0 in range CX119:DQ138 replace with "NT", then cells with value of >0 in range DR119:EK138 replace with "NU"

I thought you could do it with find and replace by just selecting that range of cells but can't see how to set the conditional >0 bit.

View 9 Replies View Related

Find Last 12 Values Based On Week Number / Year

Jul 9, 2014

I am trying to fill a table of the last 12 values for the purposes of creating dynamic charts. I remember last time i used named ranges, offsets etc etc but been too long to remember how.

Ive attached a worksheet to explain it better.

I should probably mention, I want to be able to change cells C1 and C2 to update the values. Everything else wil be rather static.

Attached File : Test.xlsx‎

View 5 Replies View Related

Find Cell In Range Based On A Value

Mar 30, 2012

I have a sheet that has six sets of three columns on it. The columns are labels Ball #1, Number Times Drawn, Last Date Came Up. The first five "sets" are the same except the ball # changes from 1 to 2 to 3 to 4 to 5. The last set has columns labeled Mega Ball, Number Times Drawn, Date Last Came Up. Yes I am doing stats analysis on lottery numbers for a project.

What I want to find is the last date drawn for each of the numbers, 1-56, and have it go into the third column of the 3 column sets.

I will use the first column set for example. I have numbers down the first column A numbered from 1 to 56 (In series). In the next column B, I have the number of times drawn for each number, which I have working. In the last column of the set I want to have the Last Date Drawn.

I tried the following function (Formula):
=INDEX(Table1[Date],SUMPRODUCT(MAX((Item=A2)*ROW(Item)))-ROW(Table1[Date])+1)

This kind of worked. It returned a date but it was not correct. It actually said the same date for each number, which I know is wrong. I can't figure out where it is actually pulling that date from.

I should clarify that the drawing numbers are on a second sheet labeled "Mega_Millions_Numbers" in a table named Table1 and the Date column is A with a column label of Date. The table has column headings of Date, Ball#1, Ball#2, etc. through to Mega Ball column.

What I need is a function or formula to pull the last date drawn. I am NOT good in any way shape or form with VBA so if I can do this without VBA it would be best for me. I can follow along with formulas and functions well enough, just not VBA.

I will need to have this formula copied down 56 times per set and there are 5 sets so i will have to modify it for the other columns. (If your keeping track that totals 336 formulas).

View 1 Replies View Related

Find Top Equivalent Values In Excel Range Without Sorting?

Mar 29, 2014

I know the formula =large but my problem is the formula for the equivalent value for it. Note: In my xcel file attached you can see there are multiple items with the same total numbers and also blanks

View 3 Replies View Related

Find Cell Value & Convert Surrounding Range To Values

Aug 1, 2008

I'm trying to create a spreadsheet to update daily, whenever our market intelligence arrives by email. I'm not trying to write a macro which can select a range of cells (G:L) relative to the date in Column B, which represents the value in cell P6. In other words:Read the value of cell P6 Find that value in column B (e.g. B646)highlight the cells in columns G through to L on that row (e.g. select G646:L646) I am then aiming to paste the values in that range of cells, so that those stay in the spreadsheet and are not lost when the next lot of figures comes in the following day.

Range("G646:L646").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=12
Application.CutCopyMode = False
ActiveWorkbook.Save

but that's obviously a static range, rather than looking up the date first.

View 2 Replies View Related

Find Common Values Across Multiple Sheets Based On Unique ID

Oct 24, 2013

The old thread is here: [URL] ....

There are three sheets in the workbook, Project, Tasks and Details and the expected resulting sheets are RESULT, In_Tasks_but_NOT_in_Projects and In_Details_but_NOT_in_Projects .

But now what I am looking for:

1. Copy the Projects data as is in the RESULT sheet.

2. Then in the Tasks sheet, if the ID matches paste the matching rows under the data from Projects (as in the result sheet with Orange colour)

3. If the ID is present in Tasks but NOT in Projects then copy it into the In_Tasks_but_NOT_in_Projects sheet.

4. Then If the ID and the Name in the Details tab matches with the data in the RESULT sheet then paste it under the ID and Name (as in the result sheet with Green colour)

5. If the ID does not match the ID in the results sheet then copy that row into the In_Details_but_NOT_in_Projects sheet.

The result of the current macro that RHCPgergo worked with are in the last sheet.

The formatting and colour of the rows doesn't matter, it is more of nice to have.

View 14 Replies View Related

Find Date Range Based On Value In Cells?

May 14, 2012

I have one excel sheet. In the first column there are various Project Codes and in the first row there are various date. Cells in the matrix contains 0 or 1 value. If value is equals to 1 that means the project was on hold during this months and if the cell value is null of 0 (Zero) it means the project was active. For a project in a particular row there are several times a project went on hold and now I want a date range showing the project's hold duration. If project went on hold more than one time the result should also give different range for each time when project went on hold.

follow the link to view the excel file.

http://www.excelforum.com/attachment...3&d=1336994800
[IMG]http://www.mrexcel.com/forum/data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAABAAAAAMACAIAAAA12IJaAAAgAElEQVR4nOy9e3gT153/P99fd7vd77fxV+3udtO06fr3PL

[code].....

View 8 Replies View Related

Excel 2013 :: Find And Replace Values In Selected Range?

Jul 13, 2014

I have Excel 2013. I would like to use the code below but I need it to let me select the range instead of specifying it in the code, then pop up a form into which I can fill in what I want it to search and what I need it replaced with.

[Code] ......

View 3 Replies View Related

Find Row Of Large Value In Array And Return Values In Different Named Range

Feb 28, 2012

I have four named ranges (Segment, Keyword, Impressions and Dropdown) and I would like to create a formula-based ranking of keywords by impressions and clicks. Using the following array formula, I am able to return the correct values for impressions or clicks:

{=LARGE(IF(Segment=DropDown,Impressions),$H7)} where $H7 is the number ranking 1, 2, 3 etc.

My question is what array formula could be used to find which row in the array returned that number and then pulls the data from the same row in the other named ranges?

Essentially find row of {=LARGE(IF(Segment=DropDown,Impressions),$H7)} but return Keyword and Clicks on that row.

Other Notes: I cannot use pivot tables and some values might be the same which would make Vlookups not accurate for duplicate values.

Link to an example document to clarify this. [URL] .......

View 9 Replies View Related

Isolate To Matches Of Name Then Find All Instances Of That Name Whose Values Fall Within Range

Jan 3, 2013

In my workbook I have two tabs, the first tab is intended to call on data located on the second tab so I can evaluate & Display it in different ways. Here's what's worked so far. Where I'm stuck is attempts to try and combine the two.

- the second tab is named AW_Items_Import

Examples:

1) Looking on the second tab to count the number of times a object (identified on the first tab in Cell B13) appears
=COUNTIF(AW_Items_Import!J:J,B13)

2) Looking on the second tab for items that fall within a set value range, the ranges specified on the first tab in cells C14 and E14

=COUNTIF(AW_Items_Import!G:G,">=" & C14) - COUNTIF(AW_Items_Import!G:G,">" & E14)

What I want to do, is combine 1) and 2) so I can isolate a search to a name specified on the first tab, THEN count the number of times that item falls within a set range, the range also specified on the first tab.

View 9 Replies View Related

Find Date Chosen From Calendar & Copy Range And Paste As Values

May 23, 2009

I've attached a workbook which contains two sheets:
PAYM
DEVICE_PAYM

Data is updated on DEVICE_PAYM each day with the figures I need located in column "AN". I need to be able to copy the data from "AN" and paste it into a column on the PAYM sheet. The destination column on the PAYM sheet needs to be specified by inputting a specific date - ideally, I would like to use the calendar Add-In as part of this process. I've already input some code for the calendar but am unable to develop this further so that it finds the correct date column and pastes the data across from the other sheet.

View 2 Replies View Related

How To Add Cumulative Values Based On A Range

Jun 17, 2014

I'm trying to add cumulative values based on two criteria, one being a constant date, and the other being a date range.

I've attached the example where I would like to sum the highlighted values. I am trying to come up with a formula based on the criteria in cells I2:K2 but can't think of anything.

Example.xlsx

View 3 Replies View Related

Set Dynamic Range Based On Values

Jul 20, 2009

I would like to create a dynamic range based on a cell value. However, the cell reference may vary because the numbers of entries in the workbook can vary.

In addition to that, after the first range (eg. A1:A10), I would like to create a second range after the first (eg. A11:A20).

View 2 Replies View Related

Formula To Return A Values Based On Whether A1 Is Within A Range?

Aug 5, 2014

I am trying to create a formula that will do the following:

If A1 is between 95 and 99 then populate with 2

If A1 is between 90 and 94 then populate with 3

If A1 is between 85 and 89 then populate with 4

If A1 is between 80 and 84 then populate with 5

If A1 is below 80 then populate with 6

View 11 Replies View Related

Calculating A Range Of Values Based On 2 Factors

Feb 2, 2009

I need a way to calculate building rates based selecting the building and the value selected;

I have a list of building construction (fire resistive - protected, non combustible - protected etc)... in cell N8 and the limits in cell O8.

Now what I need to do is calculate the rates in the file attached (cells A5:J21 in my worksheet) based on the building construction and the value/limit I select.

View 6 Replies View Related

Return Values Based On The Range In Another Cell

Nov 28, 2012

I am trying to put together a calculation sheet for court costs and I need a cell to return a value based on the amount entered in another cell. For example, if I input a value between 1 and 5 in cell A1, I would like "Cat" to appear in cell A2. However, if I input a value between 6 and 10 in cell A1, I would like "Dog" to appear in cell A2. Is this something that can be done without VB?

For the real spreadsheet, I would need the following outputs in cell A2 based on the respective ranges in cell A1:

Output to A2 = $405 if input to A1 is < $50,000.
Output to A2 = $905 if input to A1 is ≥ $50,000 and < $250,000
Output to A2 = $1,905 if input to A1 is ≥ $250,000

View 3 Replies View Related

Splitting Known Range Based On Cell Values?

Feb 5, 2013

I've attached a workbook to explain my query further but essentially I have a data range, variable in size and I would like to split the range based on values in the range (delimiters if you like) into discreet ranges.

RanaldRangeSplit_01.xlsx

View 6 Replies View Related







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