Using Median Length Of Stay With A Look Up Function

Oct 7, 2008

I have two columns of data

1st - Multiple physician names (may be duplicate as data set is Emergency Room encounters)

2nd - Denotes the length of stay in minutes for each patient encounter

I want to develop a formula to calculate the median length of stay (off 2nd col) for every physician a select in a drop down.

View 4 Replies


ADVERTISEMENT

Find The Median Call Length For Calls In A Certain Month

Dec 13, 2006

I've read several threads about using Median(If, and I have success with one criteria, but not with three. Here's the setup:

I have a log of phone calls, and I want to find the median call length for calls in a certain month or set of months (i.e. a quarter, three months). In Calls!B I have the date of the call, in Calls!C I have the call length in minutes (i.e. "34"), and in Calls!A I'm using Concatenate and Text to return month/year (i.e. "Aug06").

With one criteria, it calculates the median correctly. With three, it only returns #NUM. Yes, I hold control+shift and hit enter. Here's my formula:

=MEDIAN(IF(Calls!$A$2:$A$500=Scores!B8,IF(Calls!$A$2:$A$500=Scores!C8,IF(Calls!$A$2:$A$500=Scores!D8,Calls!$C$2:$C$500)))))
Where Scores!B8,C8,D8 hold "Oct06" "Nov06" and "Dec06" respectively. What am I doing wrong? Is there another approach I should use instead?

View 9 Replies View Related

INDIRECT FUNCTION - Make Data Stay Permenantly

Dec 9, 2009

I have approx 500 workbooks which contain custoemr details and I need to extract certain info (postcode, name, contact, phone number etc) and place it all on 1 spreadsheet. I was originally going to source data from unopen workbooks, but have realized I only need to do this task once, and I can maintain it from then on...


I have created a spreadsheet (attached) which uses INDIRECT formulas to retrieve the data. When I type in the file name in column A, Columns B to K fill themselves in. What I want to know is:

Once I open say, 10 Workbooks, TYPE the name in manually and all the other cells have filled themselves, I want to somehow KEEP the data there, rather than it return a #REF error when I close the workbooks to open the next batch.

Also, if you look at my workbook, to the far right is a range of data which I use in my INDIRECT formulas. Once I have filled all the cells with the relevant data, I want to be able to Filter my spreadsheet by Date Ascending. BUT I cant seem to do it because it includes my INDIRECT range in the filter and mess's up the formulas then I have tried Locking & protecting workbook, with Autofilter & select cells etc TICKED for users to use, but it still tells me to unlock workbook when I try to filter.

View 5 Replies View Related

MEDIAN() As Array Function?

Oct 11, 2005

Is it possible to submit the MEDIAN() function as an array (ctrl + shift + enter)?

I.e., I would like to submit a function similar to this SUM() function:
{=SUM(IF(("a"=$A$1:$A$7),$B$1:$B$7,))}

However, when I submit

{=MEDIAN(IF(("a"=$A$1:$A$7),$B$1:$B$7,))}

it does not give me the intended result.

View 6 Replies View Related

How To Make A Conditional Median Function?

May 9, 2006

for my thesis i need to create median industry multipliers. i have a list of
companies with their industry codes and multiples, but now i need to create a
list with medians per industry. is there a function similar to SUMIF for
medians?

View 11 Replies View Related

Find Median Of Large Set Of Numbers To Calculate Median Income?

Mar 6, 2014

We are trying to find the median of a large set of numbers to calculate the median income in 2010. For an example we have 8,379k people with $2500 average income, 9,783k with $7500 average income and so on. How can I calculate the median average income of such a large amount of entries?

View 8 Replies View Related

Excel 2010 :: Median IF Function For Certain Values On Different Sheet

Oct 16, 2013

I'm trying to get the Median (and min/max later) of certain values on a different sheet. For example, I'm operating in one sheet and pulling the values from the sheet "Form Responses". I want a median for numbers when the values in column B are "Aransas" and the values in column D are Yes. The values are in Column F. My formula is:

=MEDIAN(IF('Form Responses'!B:B="Aransas",IF('Form Responses'!D:D="Yes",'Form Responses'!F:F,""),""))

It's giving me the median for ALL of the numbers in F and I can't figure out why.

Following that, I'll want a median for all the numbers in F when column B value is "Aransas" (in other words, dropping the Column D condition).

Excel 2010, Windows 7

View 1 Replies View Related

Find The Median For A List Of Numbers Using =median()

Nov 11, 2009

how to find the median for a list of numbers using =median(). But what if I have a list of prices for different types of say cars.

Car Type Price

A $10000
B $15000
A $20000
C $30000

Is there a macro that will return

Car Type Median
A $
B $
C $

View 2 Replies View Related

Length Of String Changes When Passed To Function

Sep 28, 2006

The following afterupdate procedure for my txtStart1 text box sends the value to the FormatTimeValue function that is coded in a module.

Private Sub txtStart1_AfterUpdate()
MsgBox Len(Trim(Me.txtStart1.vaue)) '<= outputs 1
Me.txtStart1.Value = FormatTimeValue(Trim(Me.txtStart1.Value))
End Sub

As you can see from the bolded text, the length of the value is 1 when outputted from the forms code.

However, when I pass it to the following function in a module it outputs 2 as the length.

Function FormatTimeValue(vTarget As Integer) As String

Dim TimeStr As String

If IsNumeric(vTarget) Then

MsgBox Len(vTarget) '<= outputs 2

Select Case Len(vTarget)

Case 1 ' e.g., user entered 1 so time should be 01:00
TimeStr = "0" & vTarget & ":00"

View 3 Replies View Related

Index Function - Limit On String Length

Jun 23, 2006

I have a spreadsheet with 2 sheets. The first just links to another file and pulls in the contents of a particular sheet, cell for cell. The second sheet is a formatted report that I'm creating to put that data into a different format for presenting to others. I'm using the Index and Match function along with range names. All is fine except where the string that should be returned is very long. When that happens, I get "######" all the way across the cell. It doesn't matter how wide I make the column or how tall I make the row, the "#s" do not go away. Is there a limit on the number of characters the Index function can return?

View 5 Replies View Related

Changing Range Of Sumproduct Function Depending On Length Of Data Series

Feb 20, 2007

I have a small problem using the ‘sumproduct function’ which I am using it to calculate the area under curves using the following equation (=SUMPRODUCT((B10:B109-B9:B108)*(D10:D109+D9:D108))*0.5). However I have hundreds of curves to calculate the area under and the length of the data series for each curve is different, I am currently changing the length of the data series by hand. I have attached an example worksheet of 2 sets of data (the formula I am using at the moment is highlighted in blue – row 203). Is there are function or formula that I can use inside this equation to change the range of the formula depending on the length of the data series?

View 2 Replies View Related

Shorten String Length If Exceeds 31 Characters (max Sheet Name Length)

Mar 27, 2014

I've set up a filing system which saves sheets/ workbooks based on the value of a cell - Range("B1") Everything works great apart from when ThisFile String length exceeds 31 characters which you may know is the max useable character length for a sheet name - I had no idea! 8-0

Is there a way i can check if string length exceeds 31 characters then, if it does, shorten it to 31 characters?

[Code] .....

View 2 Replies View Related

Formula Code To Find Arc Length From Chord Length

Sep 4, 2012

How to create a code formula to calculate the arc length from a given chord length?

If you know the radius of the major circle.

Say the chord is 50mm and major circle dia is 72mm (radius 36mm)

arc from chord.jpg

View 5 Replies View Related

Give Cell A Value Based On Length Of Row (variable Row Length)

Jan 9, 2010

My worksheet contains data with the reaction times on a psychological test. Each respondent in the test has 280 rows in my excel sheet.

The 'perfect' length of the row, is from A to M. When an error is made in the test, the length of the row will increase. So the error length can be A to AA.

For me it is important to analyse the error. So I would like to give a perfect row length, the value 1, and an error row length a value 2.

So, in conclusion:

If:
Cell length = A1 - M1? --> Copy A1 B1 C1 (A B Cof that row) to Sheet3, and give D1 in sheet 3 the value 1

Cell length >= A1 - M1? --> Copy A1 B1 C1 (A B C of that row) to Sheet3, and give D1 in sheet 3 the value 2

View 9 Replies View Related

Stay The Same Or Substract

Oct 11, 2008

In Cell O4 I have a number 35 that number never changes.

Now in Cell C40 I have another number that is a formula. the formula gives me a total of how many points are left.

In C42 I want the total to either been 35 or subtract the negative number from 35, the points can never go over 35.

Any number that is a positive or 0 will equal 35, if a negative number subtract from 35.

View 9 Replies View Related

Columns Won't Stay Formatted

Jan 9, 2009

I have Excel 2008 for Mac (vers 12.0). On a basic spreadsheet, the first column is for date which I have formatted so I can type in 15/8/9 and it appears as 15-Aug-09.

However, each time I open Excel after having Quit it, I have to reformat the cells in this column again as they revert to converting my date input with something like 39,123.

My other columns are formatted to currency and are always okay.

View 10 Replies View Related

Scroll Area Set But Won't Stay Put?

Oct 29, 2007

I set the scroll area on a worksheet and saved the file. The next time I open the worksheet the scroll area is no longer set.

View 7 Replies View Related

Userform - Tab Selection Won't Stay

Jul 25, 2014

1. I have a userform I created that has a text box that pulls it's data from one of the spreadsheets tab. The userform also has 5 buttons I shall call Tab1, Tab2, Tab3, Done, Cancel.
2. The first thing a user will do is make a selection from the text box.
3. The User will then select one of the "Tab" buttons.

Below is my code. What happens is that no matter what button I click (Tab1, Tab2, Tab3) it ends up on Tab3 because it is the last transfersheet line of the done_click() sub routine. How do I get it to stay on the Tab I select?

+++++
Private Sub cancel_Click()
Unload UserForm
End Sub
+++++

Private Sub done_Click()
Dim transferworksheet As Worksheet
Set transferworksheet = Worksheets("Tab1")
transferworksheet.Cells(5, 7).Value = Me.ListBox1.Value

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

View 4 Replies View Related

Time To Stay As Text

May 30, 2008

I have a spreadsheet that tracks employee stats. Most of these stats are amounts of TIME. These times are being pasted from another source and the problem I'm having is that as soon as excel sees "1:02:03" it puts it in TIME format. The problem I have with that is later on I need it in text format because a lot of the other times are in text already. (the program the info is coming from will use ":59:59" and not have a 0, so I have compensated for that later) So how can I paste 1:01:01 and not have it saved as TIME? I cant CONVERT it to text, I need it to be text from the start.

View 9 Replies View Related

Formula To Hide Or To Stay As It Is Until Value Is Entered

May 16, 2014

In Spreadsheet A Cell H8 is entered as Item Description.

In Spreadsheet B Cell H8 is also entered as Item Description, but if the Item Description in Spreadsheet A has been changed, I need Spreadsheet B to reflect that change, if not it should stay as Item Description.

View 5 Replies View Related

Make Numbers In Formula Stay The Same

Oct 2, 2008

I have a formula:
=INDEX('Part Info'!E1:E300,MATCH(1,('Part Info'!A1:A300=A1)*('Part Info'!B1:B300=B1),0))

I want the E1:E300 to stay E1:E300 when I drag it down but I want the A1 for example to change to A2, A3, A4 and etc.

View 2 Replies View Related

Vlookup To Stay Blank If Nothing Selected

Nov 23, 2008

i have this formula which works well...

View 8 Replies View Related

Lock Column Header So That It Will Always Stay At Top?

Jan 28, 2013

How do I lock a column header so that it will always stay at the top as I scroll down the page?

View 4 Replies View Related

Marco To Stay In Selected Cell

Apr 1, 2014

I am running the below macro which work fine ! However after running the macro, I do not stay in the cell I was!! How to stay in the selected cell?

HTML Code: 

Sub INSERT()
ActiveSheet.Unprotect Password:="P@ssw0r!"
ActiveCell.EntireRow.INSERT

Range("FORMULA1,FORMULA2,FORMULA3,FORMULA4").Select
Selection.Locked = True
Selection.FormulaHidden = False

ActiveSheet.Protect Password:="P@ssw0r!", AllowFormattingCells:=True
End Sub

View 1 Replies View Related

R1C1 Reference Style Won't Stay Gone

Dec 12, 2011

Every time I copy and paste cells in a specific workbook it changes the reference style to R1C1. Setting it back in the options, saving the document, closing Excel then reopening brings it back as A1 referencing but copy and paste will again return it to R1C1.

I've checked for VB code and there's nothing there either.

View 1 Replies View Related

Excel 2003 :: Get Some Information To Stay Still?

Jan 29, 2012

While using Excel 2003, I am aware of "freeze plane" and "split worksheet". The freeze plane comes in handy if I want to the first few rows to remain stationary and displayed while I can scroll down to the rows below. Similarly, the split worksheet comes in useful if I want to have the first few columns remain in place while I can maneuver to the right to see the other columns.

*** THE QUESTION IS: how can I get cells A1 to F20 to remain displayed and unmoved even if I choose to move the active cell around anywhere between G1 to K9999

View 9 Replies View Related

NAME Doesn't Stay Attached To The Cell

Mar 19, 2008

I have a cell (H27) which has a (sum) total in and have attached a NAME FRED.
This is fine as long as the client doesn't add a row above it.
If they do when I re-open the sheet the NAME doesn't stay attached to the cell (now H28)

Is there a way to keep the NAME attached to the cell regardless where it is?


Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Range("$H$27").Name = "Fred"
End Sub

View 9 Replies View Related

Highlight Every Other Row & Stay Highlighted After Sort.

Apr 22, 2006

I have an excel spreadsheet that shows every other row in a pale blue. When I do data sorts, the rows loose their order. Is there a way to keep the row color in every other row and still keep it that way after the data is sorted?

View 2 Replies View Related

How To Make Text Boxes To Stay In Place

Nov 13, 2013

I have text boxes for additional information. Is it possible to make text boxes to stay in place so that if I or someone else deletes a column the text boxes would not shrink and move to the left?

View 2 Replies View Related

Code To Move To A Cell (stay In Top Corner)

May 11, 2009

I want code to move the cursor to A788

But keep A788 in the top left corner on screen.

Is there easy code to help me accomplish this?

Also, Is there code that will take you to the first cell it finds closest to today's date.

Dates are in Column B.g

View 9 Replies View Related







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