auto populate column B based on column A options - excel-formula

In Column A I'd like to list one of many providers and consequently would like Column B to auto populate with the provider's pre-op nurse. There are multiple providers to one pre-op nurse. For instance Providers A, B, C, D, E belong to pre-op nurse X, Providers F, G, belong to nurse Y, and Providers H, I, J, K, L belong to nurse Z. I tried an IF OR statement but could only get it to work for one nurse, not multiple nurses.

Try using VLOOKUP function in Excel. You can have a separate table for the providers and the pre-op nurses and then populate the Column B by looking up the separate table.

Related

Excel Lookup and sum multiple values

A B C D D E F
DEForage201 DE Deutschland 201 Perennial Ryegrass Forage 789951
DEForage201 DE Germany 201 Perennial Ryegrass Forage 5617026
In the list above (starting in column A which is an ID line compiled by column B, F and D) I want to lookup and get the sum of the rightmost column.
Currently I am using vlookup and look for the ID line in column A, until I noticed that the country names in column C would differ during the list which is why I am having identical ID lines in column A and currently only get the first value.
Any ideas how to solve this?
Assuming you're looking for a way to view the sum of column F for each unique combination of columns A through E, a Pivot Table might be what you're looking for. You can select columns A through E as the "rows" for the pivot table, and sum of column F for the values. Adjust the report layout in the Pivot Table Design tab to get it to look the way you want.

Excel - how to look in a dynamically changing range of multiple rows and columns and retrieve data

I have 2 excel files. 1 is a workfile in which I work, the other is the output of a database. See pic 1 for my database output (simplified).
What we see here:
The purchase order numer in column A
The row in the database in column B
The status of the row in the database in column C
The classification in column D, where W means a product we want to measure and P meaning delivery costs, administration costs etc (we don't want to measure this)
The number of items ordered and the number of items delivered in column E
The company name and product info in column F
Now, what I want, is something like this:
I want this table to be filled automatically based on the database output. It works for column B, but I'm stuck on column C, D and E.
What I want from you!
I need help with column C, D and E.
Number of rows: it needs to calculate the rows only with W in column D. So for item 4410027708 it has to be 2 (only 2 rows with W) and for item 4410027709 it should be 1.
Items ordered: it needs to add-up all the values that are directly to the right of the W in column D. So, for 4410027708, it needs to add up 3 and 5. It must ignore all the rows with P!
Items to be delivered: You may already guess this, but it needs to add up all the values in column E that are on the same row as column C with To be delivered, but only for the W rows (not the P versions). So, for item 4410027708 this should be
I suggest easy if ColumnA can be filled down first (including for the last entry) then assuming the database output sheet is called Sheet1, in:
C2: =COUNTIFS(Sheet1!A:A,A2,Sheet1!D:D,"W")
D2: =SUMIFS(Sheet1!E:E,Sheet1!A:A,A2,Sheet1!D:D,"W")
E2: =SUMIFS(Sheet1!E:E,Sheet1!A:A,A2,Sheet1!C:C,"To be delivered")
copied down to suit.

Excel: Count of reciprocal pairs in two columns

I have two columns that each contain pairs of individuals.
Individual 1 Individual 2
A B
A C
A D
B A
C A
C D
How would I create a count of the number of times an individual has a reciprocal pair i.e. matched with the same partner but in the opposite order? For this example, the output should be:
A: 2
B: 1
C: 1
D: 0
I think this is quite tricky but here are two suggestions
=SUMPRODUCT(COUNTIFS(A$2:A$7,B$2:B$7,B$2:B$7,A$2:A$7,A$2:A$7,C2))
or
=SUM(((A$2:A$7&B$2:B$7)=TRANSPOSE(B$2:B$7&A$2:A$7))*(A$2:A$7=C2))
The second one has to be entered as an array formula using CtrlShiftEnter and I'm assuming that the A's and B's are in A2:A7 and B2:B7 and you can get a list of the four individuals A, B, C and D in C2:C5.

How to implement a count if and index or match function in Excel

I am working on a template which records actions of specific companies during an auction. In Column J I have actions, and column K I have the company name. What I need help with is integrating a function to check the validity of a specific action. Essentially You cannot have an action of neg in column J without an action of bid in column J for a specific firm.
So I am trying to use conditional formula to create a check to see if for a given firm in column K is the count of neg less than the count of bids for the same firm in column J
These are the column names, the actions themselves are all in the same clump.
How many actions do you have? If there are not many you could add a column for each action with a count.
For example, add a column called Compare_1 in column L and a column called Compare_2 in column M.
In column L create a countifs formula (I started in Row 3, if your data starts in row 2 you would change K3 to K2)
=COUNTIFS(K:K,K3,J:J,"neg")
You can also modify the formulas to incorporate each type you need to compare in Compare_1 and then do the same in the next column for the Compare_2 data.
=IF(OR(J3="neg",J3="bid"),(COUNTIFS(K:K,K3,J:J,"neg")),IF(OR(J3="dog",J3="puppy"),(COUNTIFS(K:K,K3,J:J,"dog")),0))
and in column M create a countifs formula
=COUNTIFS(K:K,K3,J:J,"bid")
Then create a validation column in column N with the formula
=IF(L3=M3,"Valid","Not Valid").
Again to combine for Compare_2
=IF(OR(J3="neg",J3="bid"),(COUNTIFS(K:K,K3,J:J,"bid")),IF(OR(J3="dog",J3="puppy"),(COUNTIFS(K:K,K3,J:J,"puppy")),0))
There could be an easier 1 step process from someone else, but this is what I came up with.

Microsoft Excel Referencing data

I am trying to figure out how to look up a cell to see if it contains a name from a list I have specified, we will use "Hofmann Trucking" for example.
Using columns a,b and c where column a contains average hours it takes for truck to travel from point a to point b, column b contains the carrier information (Hofmann Trucking) and finally column c which is where I would like the answer to go.
I want column c to return the time listed in column a, only if Hofmann trucking is the carrier in column b. If another carrier is listed I would like to put that information in column d.
In the end these times will be averaged per carrier per day so I can easily show how much time is spent traveling to and from certain areas by different companies.
This should do it:
Col A Col B Col C Col D
8 Hoffman Trucking =If(B1="Hoffman Trucking",A1,0) =A1-C1
Put those 2 formulas in columns C & D and drag down...

Resources