At work we have a large collection of sheet that I'm trying to add a couple columns to.
Some of the Index functions were already in the sheets so I am trying to base my new index function off of it because I have never used these types of functions in Excel. The old function is as follows.
=INDEX('Order Detail'!$D:$D,MATCH($A9,'Order Detail'!$B:$B,0))
Order detail is the name of the sheet that is holding the date for the output.
A9 is the part number in the current sheet.
And the part numbers are listed in column B or the order detail sheet.
What I know want to do is match the part numbers for the two sheets and match the dept number. The dept number is located in column L of the order detail sheet and I want that to match 1000-1. Not 1000 minus 1 actual 1000-1.
IF both of those match I want to spit out the data from column O in the order detail sheet and output that in column U starting at U9 and down in the current sheet.
This is what I have so far for this but it does not work.
=INDEX('Job Routing'!$O:$O,MATCH($A9,'Job Routing'!$B:$B,0),MATCH('Job Routing'!$L:$L,"1000-1"),0)
I only want it to output the O column if the Part Number AND Dept Number are the same as the part number in A9 and the dept number the same as 1000-1.
Any ideas?
Thanks
Related
Sheet 1:
Column A: email
Column B: name
Column C: action
Sheet 2
Column B: name
*there are dulpicate names in sheet 1, so each name could have different action and email.
**there are some names in sheet 2 that are not in sheet 1
***there are over 1000 rows.
How do i return the values in sheet2 such that i have the emails, common names and action tgt. Horinzontally.
First, you need an additional column in Sheet1 which counts the occurrences of of each name. Second, in Sheet2, you need to match a name and its occurrence within Sheet1.
The picture below, shows (on a single sheet) an arrangement that you might want to adapt.
In my example I have allowed up to 5 email/action pairs per name, though the solution can obviously be adapted to the requirement of your data.
The solution uses a COUNTIF() function in the "input" table to generate the occurrence number of each name.
In the "output" table, the 5 helper columns identify the row number of the input table matching to the 1st, 2nd,... occurrences of the name, with a zero indicating no match. The SUMPRODUCT() function generates this row number. The remaining columns simply pick out the appropriate email/action from the input table.
The helper columns can be avoided in the "output", but this would be at the expense of replacing the single cell references such as G2 in =IF(G2>0,INDEX($B$2:$B$9,G2),"") with the corresponding SUMPRODUCT() expression. The IF() is necessary because the INDEX() function has a peculiar behaviour when its second argument equates to zero.
Getting the correct formula for the first row of Email/Action pairs in the output table (range L2:U2) in my picture is a bit tedious and there are ways around this (based on using the COLUMN() function to calculate the appropriate helper column number). However, the solution is intended to be something to be built on so I have kept it simple.
The solution assumes that each email/action pair in the input will be kept distinct in the output. So if a name in the input has two (or more) email/action pairs which have a common email, the solution does not combine the two actions against that common email. It is possible to do this but it will require additional information to be added to the "input" table - namely the occurrence of actions associated with a specific name/email combination.
I have a spreadsheet that is pulling in call survey data and set up as follows
Main sheet is called 'Data'
In the main sheet, columns F,G,H,I hold agent ID numbers dependant on what agents worked on this specific call through it's journey to end. All agent numbers start with the prefix either of 146,144 or 145.
so for example 1st agent 14400 took the call then transferred to agent 14600 then that one onto agent 14500.
Sheet 2 is called 'Teams'
Column A holds agent ID's
Column B is team name
What i want to be able to put a formula in column A of the sheet 'Data' which will then search through rows until it finds a number begining 146.
Once it has found this number it will then search the sheet 'teams' and allocate the required team manager name from column C.
Hope this all makes sense but please let me know if not.
Thanks
This is the solution (I tested it on your spreadsheet):
=VLOOKUP(SUMPRODUCT(--(F2:I2>=146000),--(F2:I2<=146999),F2:I2),Teams!A:C,3,FALSE)
--(F2:I2>=146000) return an array with 0 or 1, 1 if the value is greater than 146000, --(F2:I2<=146999) same but 1 if value less than 146999
SUMPRODUCT is a logical and between the three array that return the value 146xxx. to know more sumproduct
VLOOKUP search in the first column of the range A:C on the Teams' sheet for the id and return the content of the third column.
If you want to have a custom result if the 146xxx is not present in the row you have to use IFERROR(VLOOKUP(..),"TEXT_TO_SHOW")
I am trying to build a macro that will allow me to automatically fill out the cells in a column based on 2 criteria, which are the county and the project type, both of which are their own column names. The column to be filled out will be called "Frequency Band", which will have a static range of 12 possible values.
For example, if the County is "Bergen" and the Project Type is "2", then the Frequency Band will be "800Mhz". If it is the same county (Bergen) but the project type is "3", then the frequency band will be "1900MHz".
I currently have the list of Frequency Bands listed in another worksheet (Just call it sheet 2, cells E2 – E13), so I imagine that the outline of the VBA code would look something like:
If County(A) = Lee AND Project Type(B) = 2 Then Frequency Band(C) = 800Mhz(E3)
Else if Project Type = 3 Then Frequency Band = 1900MHz
Etc., Etc. for each county
Since I’ve never coded in VBA before and have no idea of its syntax, I don't really know where to begin with a formula like this. Could anyone help get me started?
Here is one way it would work with a formula.
In cells G1:K6 there is a table with your stored data (could also be on another sheet)
Column A you put in a country, column B you put in a project type (would be good if you validated against your source data.
Column C is your lookup function
'=INDEX($H$2:$K$6,MATCH(A2,$G$2:$G$6,0),MATCH(B2,$H$1:$K$1,0))
Index takes 3 main inputs:
the array (H2:K6) which is the actual frequency values
a row number in this array, and a column number in the array
For the row number lookup your country in the list you have (g2:g6) and it will tell you it is the x number in the array which corresponds to the row in the index array
Same thing with the column and project type.
There is a ton of information on the net about index and match if you need more information.
Highlighing is to show which values the formula has picked in my three examples below.
This is a confusing request.
I have an excel tab with a lot of data, for now I'll focus on 3 points of that data.
Team
Quarter
Task Name
In one tab I have a long list of this data displaying all the tasks for all the teams and what Quarter they will be on.
I WANT to load another tab, and take that data (from the original tab) and insert it into a non-list format. So I would have Quarters 1,2,3,4 as columns going across the screen, and Team Groups going down. I want each "task" that is labeled as Q1 to know to list in the Q1 section of that Teams "Block"
So something like this: "If Column A=TeamA,AND Quarter=Q1, then insert Task Name ... here."
Basically, if the formula = true, I want to print a list of those items within that team section of the excel document.
I'd like to be able to add/move things around at the data level, and have things automatically shift in the Display tab. I honestly have no idea where to start.
If there is never a possibility that there could be more that 1 task for a given team and quarter, then you can use a formula solution.
Given a data setup like this (in a sheet named 'Sheet1'):
And expected results like this (in a different sheet):
The formula in cell B2 and copied over and down is:
=IFERROR(INDEX(Sheet1!$C$2:$C$7,MATCH(1,INDEX((Sheet1!$A$2:$A$7=$A2)*(Sheet1!$B$2:$B$7=B$1),),0)),"")
I came across this situation. When I have to insert the values into a table from an Excel sheet I need all information in 1 Column instead of 2 multiple rows. In Excel my Data looks like:
ProductID----OrderID
9353510---- 1212259
9650934---- 1381676
9572474---- 1381677
9632365---- 1374217
9353182---- 1212260
9353182---- 1219361
9353182---- 1212815
9353513---- 1130308
9353320---- 1130288
9360957---- 1187479
9353077---- 1104558
9353077---- 1130926
9353124---- 1300853
I wanted single row for each product in shape of
(ProductID,'OrdersIDn1,OrderIDn2,.....')
For quick solution I fix it with a third column ColumnC to number the Sale of Product
=IF(A2<>A1,1,IF(A2=A1,C1+1,1))
and fourth Column D as a placeholder to concatenate with previous row value of same product:
=IF(A2=A1,D1+","&TEXT(B2,"########"),TEXT(B2,"########"))
Then Column E is the final column I required to hide/blank out duplicate row values and keep only the correct one:
=IF(A2<>A3,"("&A2&",'"&D2&"'),","")
Final Output required is only from Column E
ProductID Order Id Sno PlaceHolder Required Column
9353510 1212259 1 1212259 (9353510,'1212259'),
9650934 1381676 1 1381676 (9650934,'1381676'),
9572474 1381677 1 1381677 (9572474,'1381677'),
9632365 1374217 1 1374217 (9632365,'1374217'),
9353182 1212260 1 1212260
9353182 1219361 2 1212260,1219361
9353182 1212815 3 1212260,1219361,1212815 (9353182,'1212260,1219361,1212815'),
9353513 1130308 1 1130308 (9353513,'1130308'),
9353320 1130288 1 1130288 (9353320,'1130288'),
9360957 1187479 1 1187479 (9360957,'1187479'),
9353077 1104558 1 1104558
9353077 1130926 2 1104558,1130926 (9353077,'1104558,1130926')
You will notice that final values are only with the Maximum Number of ProductSno which I need to avoid duplication ..
In Your case Product could be Team and Order could be Quarter and Output could be
(Team,Q1,Q2,....),
Based on my understanding of your summary above, you want to put non-numerical data into a grid of teams and quarters.
The offset worksheet function will work well for this in conjunction with the match or vlookup functions. I have often done this task by doing the following steps.
In my data table, I have to concatenate the Team and quarter columns so I have a unique lookup value at the leftmost column of your table (Note: you can eventually hide this for ease of reading).
Note: You will want to name the input range for best formula management. Ideally use an Excel Table (2007 or greater) or create a dynamically named range with the offset and CountA functions working together (http://tinyurl.com/yfhfsal)
First, VLOOKUP arguments are VLOOKUP(Lookup_Value,Table_Array,Col_Index_num,[Range Lookup]) See http://tinyurl.com/22t64x7
In the first cell of your output area you would have a VLOOKUP formula that would look like this
=Vlookup(TeamName&Quarter,Input_List,Column#_Where_Tasks_Are,False)
The Lookup value should be referencing cells where you have the team names and quarter names listed down the sides and across the top. The input list is from the sheet you have the data stored. The number three represents the column number the tasks are listed in your source data, and the False tells the function it will only use an exact match in your putput.
So I have an excel dataset of participants that are possibly eligible to partake in a study that consists of their names, age, telephone number, etc... like:
Name | Age | Phone | Email | Address | Studies Participated in
I also have a column of names of participants that are eligible for a new study; it is a subset of the data in the name column.
What I need to do is select all of the participants whose names are in the subset column, and copy and paste all of their information in all of the columns into new columns.
I have tried something like, selecting an empty column and using =IF($Name-column = $Subset-column, First-Column:Last-Column, "") But this only checks if the name in each cell of the Name Column matches the name in the Subset column. What I need is something that checks if any of the names in the Name column match those in the Subset Column, and if they do, then to copy that row to a new worksheet.
Using a VLOOKUP should do the trick.
In an empty column next to the name table, you would want to enter a set of formulas something like:
=IFERROR(VLOOKUP(<name_from_current_row_of_name_table>,<subset_column_range>,1,FALSE),0)
Then you can apply a filter to the name table and set a condition to exclude the 0's in the new column. Copy the filtered data to the new sheet.
You can Index all of your data and then Match rows to the subset names and pull over each column.
For example, it would look something like this:
=INDEX(All!A1:F4,MATCH(Subset!A2,All!A1:A4,0),2)
Let's break this down:
The index function takes the following arguments:
Index(Array, Row_Number, Column_Number)
The array will be all the data you have, the row number we'll use a match function (below) to find which row to get data from, and the column number represents which column from the index to pull information from (we'll keep incrementing this to get all the columns).
To return the correct row, we'll use match
Match(Lookup_Value, Lookup_Array, Match_Type)
For lookup value, we want to point it to the current row of the subset list, the lookup array will be all the names available from the index we defined previously in the master list, and the match type will equal 0 (for exact match)
Take a look at this excel document