I have a workbook with 2 sheets containing the same list of clients, but with different data relating to the client. Both sheets use LastName and FirstName as the first two column headers. Both sheets have about 10 additional columns, each being unique.
Sheet 1 is the "master list" table with 90 current names. We insert a row and add new names as
we get new clients.
I am trying to get sheet 2, with 65 of the 90 names, to update dynamically when a new row and name is added to Sheet 1.
After researching, I found I could use Power Query to merge Sheet 1 with Sheet 2 and Load the Output to a new Sheet. Let's call it Merged.
It looks great, so I hid the original Sheet 2 because it is now outdated. I no longer want to interact with Sheet 2, I want to interact with the new Merged Sheet. Now when I add a row to Sheet 1, Merged updates nicely with a new row and Names in place.
Problem: I can't add or change data on the Merged Sheet (Query output) without it disappearing as soon as I Refresh. It reverts back to the original.
Can I overwrite/add data to the Power Query output and save those changes? Somehow preventing Sheet 2 from clearing out the new data. Is that even a thing?
Can I Only update one of the connections - Sheet 1 and leave Sheet 2 dormant?
Am I using Power Query when I should be using something like XLookup?
I want to get rid of the original Sheet 2. It has become obsolete now that 30 new clients have been added to Sheet 1, and will continue to fall behind.
Thanks for the help.
Initially I was stumped on how to merge two sheets while shuffling the new names with the old, but a Power Query work for that problem.
Then I had the new table with the data in the correct position and order.
I found the quick tutorial from Jenn at this link; When a row is added to one sheet, automatically add a row to another sheet
This opened my eyes to the possibility that a Query can be only one connection. So I created a new sheet with the single query to the names on Sheet 1.
I copy/pasted the Merged info into the new sheet, and expanded the table range to include the new info and viola! I have a dynamically updating sheet based on the Sheet 1 list of names.
Now I can delete the original Sheet 2 and move forward and the original query.
Related
I have a source Excel worksheet [image 1]. This will change over time and the new data is not appended in the source file but inserted somewhere in the worksheet [image 3].
In another worksheet I am using power query to load the data from source.xlsx into a new table. This is used to add some additional data as new columns [image 2].
If I refresh the worksheet and additional data was inserted in the source.xlsx all data below the new entry is shifted down except the data in the new colums. Therfore the additional data is not in the correct row anymor [image 4]
Is there a way to append new rows to the bottom or create a new row for new data in the source file?
It depends how the data you adding is organized.
Probably the easiest way is to add this data as xlookup. This way if you use column A as match criteria it will be always correct and matching regardless the sequence/order of values in column A.
In PowerQuery you can do similar with MERGE/JOIN.
In both cases you need a link/reference in the 2nd table where your additional data is, in order to have something to match with.
If you just want to make sure to have new entries at the bottom, adding an ID column with increasing number and sorting against it should do the trick.
I am creating a 'recruitment spreadsheet' in which I want to record employee interviews and outcomes. For convenience I have created a separate sheet called 'Failed Candidates'. I want this to act as an easy point of reference to let candidates know of their failure.
Tracking sheet - this is where all candidate info is stored, as well as outcomes.
This is the 'Failed Candidates' sheet - currently manually populated.
I would like Failed Candidates to auto generate.
WHEN OUTCOME ON 'TRACKER' SHEET = FAILED THEN COPY THE FOLLOWING FROM 'TRACKER' TO 'FAILED CANDIDATES'
First Name
Last Name
Email
Position
R1 Date
R1 Outcome
R1 Feedback
R2 Date
R2 Outcome
R2 Feedback
You cannot use worksheet formulas to copy data from one sheet to another. What you describe is basically a report on the table with all the data.
There are several ways to create such a report, including:
manually populate (as you are doing now)
use Power Query to query the original data, filter by outcome, remove unwanted columns and load into the report sheet. Refresh when the original data table changes
use a formula to generate a list of names that have the status "failed", for eg =FILTER(<Name column in Table>,ISNUMBER(SEARCH("failed",<Outcome column in table>))), then use lookup formulas to pull data from the desired columns for each name
use VBA and write code
I have a excel master list (Master.xls) which is updated regularly with tons of rows of data example it has unique column A,B,C,D,E. I need to create a new workbook (Report.xls) with reference to the master list (without editing or adding filter in master list) and extract all the rows that fulfill criteria example, get and display all the rows that column C = 300. In way where by when i update the master list, this report will update after refresh.
I tried online using Index but is not working and trying to minimise the use of macros or vba
What you describe is the perfect scenario for Power Query. Use it from a new workbook, load the master workbook into the query editor, filter and clean the data as you need and save to a sheet.
When the data in the master file changes, all you have to do is refresh the query. All this can be done without writing a single line of code, just clicking icons in the user interface.
So I have created a Microsoft Flow between MS forms and an excel workbook.
Every time a form is submitted, the responses are collected in a table in a single row (4 columns). Every time a new form is submitted, a new row is inserted at the bottom.
For example, my table has one row (Row 1). a new survey is submitted -> row 2 is created using MS flow.
Now I have another worksheet in the workbook that has some formulas looking at the row 1 in the table. The row in this new worksheet full of formula is also in A. Now when a new survey is submitted, I can't find a way to automatically detect the new row b and insert a new row into 2.
Is there something, like a macro that can do this?
Thanks in advance.
Some terminology: In an Excel spreadsheet, a row does not have a letter. Row "A" and row "B" is just wrong wording. Please use the correct terms. It should be row 1 and row 2, but since you are writing into an Excel table, row 1 will be the column titles (or table headers), so your first row of data returned by Forms will be in row 2.
An Excel survey or Forms reply is not created with Flow, the Forms reply is collected with the Forms engine and added to the Excel workbook. If you have another sheet in the workbook that wants to evaluate the original responses coming in through forms, you can use an Index function and pre-fill it for the expected number of replies.
You can use formulas to pull the last populated row from the original data table.
You can use Flow to do something if the workbook that stores the Forms data is modified, but as far as I know, Flow does not have any tools to look at the "last" entry made in a Forms survey.
You may want to check your expectations and spell out what you would like to achieve before focusing on tools that may or may not be able to deliver that outcome.
On my first worksheet in the workbook, I have a large table with multiple columns and rows (roughly a 1000 rows and 20 columns).
I was wondering if it is possible to display part of this table in another worksheet in the workbook based on the criteria from one of the columns in the main table.
To help explain this, I will use an example from the actual workbook.
On worksheet 1 (called General Employee Info which is the main table), in Column A each row has a unique number identifying an employee (each employee has their own ID number).
Column B holds their office location (a city/municipality). Column C holds the state the office is in. Column D holds their salary amount per year.
There are multiple more columns with this type of employee information, which needs no further explanation.
My question is, can I label Sheet 2 in the workbook "New York State" and have that sheet display all the same information as Sheet 1 (all the same columns) but only display the employees that work in the state of New York?
And then have another sheet labelled "California" and have only the employees that work in California on that sheet and so on... In other words, have a separate sheet for each state.
It's essentially like filtering the main table using the State column to show only one state, but I want the results in a separate sheet instead of filtering the main table which holds all the information.
I was thinking of using a pivot table in each new sheet, but am not sure that's the right approach.
Is this possible? I hope I was clear in explaining the problem.
I really recommend using the excel tables feature if you are using Excel 2013 or later as a starting point. Tables rock for many reasons, including making your sheets more readable for users, and making formulas for things like INDEX/MATCH much less error prone.
Once the tables are in place with the main data, to subset I use the data modeling capability to link back to those tables.
These steps in Excel 2013 - version active around 2018. It's changed in Office 365 (see below)
create a sheet, or go where you want the table in your current sheet.
click the 'data' tab and select "connections" in the connections section.
from there select the drop down on the add button and select Add to Data Model..
Connections Dialog
Click the tables tab. Click the table you want.
now close the dialog
on the data tab, click Existing Connections in the "get external connections" of the data tab.
Click the Table tab
Select the table you want
Select the table radio button
hit return (or new sheet or a different cell if that's what you want)
poof your table from another sheet is now reflected in the current worksheet.
At this point you can subset using data slicing, hide columns, insert new columns with new formulas on the right or left edges of the table, etc.
You do have to refresh this separately using the 'refresh all' button on the tool bar.
In Excel as of October 2019 as (Thank you Josh for point this out!) It's gotten better as they include some of the 'power' tools in excel, and made a toolbar item that gets to the functions. Specifically:
Create a Table with the source data by selecting the data in the sheet, and using insert Table.
Select the Table
On the Data Tab click the small icon in the lower middle with the tooltip "from Table/Range"
This will Open the Power Query Editor. Microsoft has a tutorial; but it looks a little different now
After you've built your query; press "Close and Load" in the editor. Without options it will create a new sheet. If you choose the option with the ellipsis you have a few other options.
There is a variation of what you are trying to do here : http://www.get-digital-help.com/2009/09/28/extract-all-rows-from-a-range-that-meet-criteria-in-one-column-in-excel/
If all your data is on Sheet1 and you define a range (CTRL F3) which contains all the elements called [tbl]
In Sheet2 In cell A1 enter the column number that you are searching Sheet1
In Sheet2 in cell B1 enter the search criteria (ie, the State you want to filter by)
From Cell A2 to Z1000 (for example) enter the following array formula (So enter using CTRL SHIFT RETURN)
=INDEX(tbl, SMALL(IF((INDEX(tbl, , $A$1, 1)=$B$1), ROW(tbl)-MIN(ROW(tbl))+1, ""), ROWS(A2:$A$2)), , 1)
One key point to note in the execution of this is to create the array for the first row first, CTRL SHIFT RETURN to create it, then drag it down. Doing it in the wrong order won't increment the row counter at the end of the function properly. Just follow the instructions at the link at the start of this post and your should get it.