Create Dynamic dropdowns with no blanks - excel

I'm trying to create a dropdown on sheet1 from data on sheet10. I cannot add a new column on sheet10, so I need to dynamically create the dropdown. There will be at least 1500 rows on Sheet10, but the dropdown needs to only list Column2 if the column4 matches a value on Sheet1!A1.
Ideally, the pulldown will concatenate the two Columns (e.g. "Column2(Column4)" but that is gravy.
I've tried several similar answers on this sight, but most require creating a column of the subset, then creates Formula:Name, then Data validation. I've tried making the NAME item WITHOUT creating the helper column using FILTER and OFFSET and some others...
Sheet1:A1 = My Department
Sheet1!B3:B500 "MyNewDropList" Data validation.
Sheet 10!
REF DOC TASK DATE ORG
------- ------ -------- -------
DOC 1 TASK 1 1/1/2000 My Department
DOC 1 TASK 2 1/1/2000
DOC 1 TASK 3 1/1/2000 My Department
DOC 1 TASK 4 1/1/2000
DOC 1 TASK 5 1/1/2000 Your Department
I would like to have a dynamic dropdown on Sheet1!B2:B550 that will include the values in SHeet10!B2:1500 if the "ORG" = the value in Sheet1:A1 (In this case "My Department" If possible, I would like to include ORG in the dropdown.
With the values above, I would need the pulldown in SHeet1! Column B, to show:
TASK1
TASK3
Or better would be:
TASK 1 (My Department)
TASK 3 (My Department)
The dropdown needs to be dynamic so that if The value any value in ORG is changed to "My Department", then the dropdown would need to include the new TASK meeting the My Department criteri

Since I can't add a column, I've decided to create a separate worksheet. From here I've created my dynamic list, created a name (excluding the blank lines). I now have my pulldowns working, but was hoping to do so without creating the separate worksheet.

Related

Create a table in a new sheet with data from two different tables in two different sheets in excel

I am new to Excel and is currently struggling to get intermediate formulas right.
Here is what I'm trying to achieve.
A) I have three sheets,
EMPLOYEE, 2. PROJECTS and 3. ENGAGEMENT
B) EMPLOYEE sheet contains information about an employee. Employee ID (EMP_ID) is generated from the name entered.
C) PROJECTS sheet contains information about the projects handled or being handled. Project ID is generated from the name of the project. Most important part is the column "Resource 1" through "Resource 20" for now. As of now, a project can have maximum of 20 resources allocated to it. One can select resources from the drop-down list.
What I am trying to achieve is,
On "ENGAGEMENT" sheet, all the projects where a resource is engaged needs to appear under "Project 1" through "Project 10" columns (assuming that a person can work on maximum of 10 projects).
I need to show stats for projects between START and END date in ENGAGEMENT sheet. However, this is not of highest priority.
Please note that, I want to achieve this with formulae only, not script or macro.
Please look at the attached screenshots and the sheet I've attached.
Thanks,
Dave
Screenshots and references can be downloaded from below given links.
[1]: https://i.stack.imgur.com/kTcjW.jpg
[2]: https://i.stack.imgur.com/yLyZI.jpg
[3]: https://i.stack.imgur.com/WeoTj.jpg
[4]: https://i.stack.imgur.com/LgDiW.jpg
[5]: https://docs.google.com/spreadsheets/d/1qikvz4X6bvKO8PyB_nrmZA64x6StUMlh/edit?usp=sharing&ouid=109764009612506156621&rtpof=true&sd=true
=ARRAYFORMULA(IFERROR(SPLIT(IFNA(VLOOKUP(TRIM(A3:A),
SPLIT(SUBSTITUTE(TRIM(FLATTEN(QUERY(QUERY(SPLIT(FLATTEN(QUERY(FLATTEN(IF(DAYS(
IF((PROJECTS!D2:D4="")*(PROJECTS!C2:C4<>""), TODAY(), PROJECTS!D2:D4), PROJECTS!C2:C4)>
SEQUENCE(1, 1000, ), ROW(PROJECTS!A2:A4)&"×"&PROJECTS!C2:C4+SEQUENCE(1, 1000, )+1, )),
"where Col1 is not null")&"×"&TRANSPOSE(QUERY(FLATTEN(
IF(PROJECTS!I2:4="",,ROW(PROJECTS!A2:A4)&"×"&PROJECTS!I2:4&"×"&PROJECTS!A2:A4)),
"where Col1 is not null"))), "×"), "select max(Col5) where Col1=Col3 "&
IF(D1="",," and Col2>="&VALUE(D1))&
IF(F1="",," and Col2<="&VALUE(F1))&
" group by Col5 pivot Col4"),,9^9))), " ", "×", 1), "×"), 2, 0)), " ")))

how to merge two rows into one in spotfire?

I am stuck at a point in spotfire wherein I need to transform the table (the one below)
ID First name last name
1 Mark
1 Taylor
2 Howard
2 Giblin
to (the table as shown here)
ID First Name Last Name
1 Mark Taylor
2 James Bond
Could someone please help me out. Thanks for the help in advance!
File > Add Data Tables
Add (button) > From Current Analysis > "Your Table Name"
Under transformations, Select "Calculate and Replace Column" > Add (button)
Then use this formula
Max([FirstName]) over ([ID]) as [FirstName]
Repeat the last step for you last name
Max([LastName]) over ([ID]) as [LastName]
Note, you could do this in a cross table or a calculated column as well. It will not remove the duplicate rows though, only fill in the gaps.

Excel - Help Needed with Formulas

I'm looking to try do the following;
I want to have say 3 columns.
Transaction | Category | Amount
so I want to be able to enter a certain Name in Transaction say for argument sake "Tesco" then have a returned result in Category Column say "Groceries" and I can enter a specific amount then myself in Amount Colum.
Thing is I will need to have unlimited or quite a lot of different Transactions and have them all in pre determined Categories so that each time when I type in a Transaction it will automatically display the category for me.
All help much appreciated.
I know a simple If Statement wont suffice I can get it to work no problem using a Simple IF Statement but as each Transaction is different I don't know how to program further.
Thanks.
Colin
Use a lookup table. Let's say it's on a sheet called "Categories" and it looks like this:
| A | B
1 | Name | Category
2 | Tesco | Groceries
3 | Shell | Fuel
Then, in the table you describe, use =VLOOKUP(A2, Categories!$A$2:$B$3, 2, FALSE) in your "Category" field, assuming it's in B2.
I do this a fair bit using Data Validation and tables.
In this case I would have two tables containing my pick lists on a lookup sheet.
Transaction Table : [Name] = "loTrans" - with just the list of transactions sorted
Category Table : [Name] = "loCategory" - two columns in table, sorted by Both columns - Trans and Category
Header1 : Transactions
Header2 : Category
The Details Table:
the transaction field will have a simple data validation, using a
named range "trans", that selects from the table loTrans.
the transaction field will also use data validation, using a named
range, but the source of the named range ("selCat" will be a little more
complex. It will be something like:
=OFFSET(loCategory[Trans],MATCH(Enter_Details!A3,loCategory[Trans],0)-1,1,COUNTIF(loCategory[Trans],Enter_Details!A3),1)
As you enter details, and select different Transactions, the data validation will be limited to the Categorys of your selected transactions
An example file

Convert SAP BI hierarchy to flat table

I have a table:
Old table
Level 1 is top level. CC is the smallest unit inside our company.
What I want to do is convert this table into a flat table with additional column like level 1 / level 2 / Level 3, which show parent department of each node,
e.g. 100111 |CC |3 |IS// |IS/ |IS.
New Table
Using Excel I can do it easily by using some conditional formula and copy the cell above if current cell is CC.
My process is like this: SAP Application (export)-> .xls file (without Level and Parent Columns) -> creating new column for level and parent node with power query -> make new column (level 1 - 6) like example in the new table.
For Column Level 1 i use this formula:
If(B2=1;A2;D1)
and i fill it down for the rest. In my data, the first row is always level 1.
For Level 2:
=IF(B2=2(//because is Level 2),A2,IF(B2<2,"",E1))
And i repeat the same formula for other Column.
Can someone suggest me a solution for this problem?
I think the Power Query equivalent of your first formula would be to Add a Column with this formula:
if [Level] = 1 then [Department] else null
I would follow that with a "Fill / Down" step (from the Transform ribbon).
The subsequent formulas would look similar, e.g. for Level 2
if [Level] = 2 then [Department] else null
Follow each with a "Fill / Down" step and you should be done.

How get rows with oldest date per year

I have task in excel. I think I show you it on example. Let say we have table as:
ID date
1 2015-03-11
1 2015-05-13
2 2013-01-10
2 2010-05-11
1 2014-09-19
2 2013-04-01
I have to make some operations to get rows with oldest date per every year. So I should have:
ID date
1 2015-03-11
1 2014-09-19
2 2013-01-10
2 2010-05-11
I will grateful for any help. Thanks in advance!
This is but one option. I like using SQL for this type of work and since Excel can connect to itself as an ODBC data source, that's just what I did here...
Create a Named range in excel (I called mine SomeTable) I do this by selecting the range in question and clicking in the drop down field to the left of the formula space that usually lists the selected cell (B11 in image below)
I then select data, from external sources and select the option for Microsoft Query (ODBC). Select new data source give it a name (Excel File name) Select microsoft excel driver. click connect. browse to where the file is containing the named range (Some table) Select ok and then in the 4th option select the named range (SomeTable)... select a place to put the table on a worksheet.
Now click in the "table" data it creates and go to the data menu properties. and enter the following in the definition tab under command text
.
Select ID, Date
FROM SomeTable ST
INNER JOIN
(Select MIN(date) as mDate, year(date) as mYear
FROM someTable
Group by year(date)) A on
ST.Date = A.mDate
If all done correctly you should get results like this:
Column EF is the source table named "SomeTable"
A10 is where I chose to put the table
B20 is where the SQL used to get the max per year
was put.

Resources