How to keep data together in excel - excel

i have a spreadsheet in excel 2016 that uses the following formulae
=IFERROR(INDEX(Attending!$A$2:$A$20,AGGREGATE(15,6,(ROW($A$2:$A$20)-ROW($A$2)+1)/(Attending!$B$2:$B$20="Yes"),ROW(1:1))),"")
This formula takes names in column A of the attending sheet and if column be against those names is set to "Yes" they show in the menu choices sheet.
but it only adds entries into column A of menu choices sheet
so then in the destination sheet entries against these peoples name in columns B, C and D get out of wack of someone else gets added above them.
how do I link a given persons B, C and D data to them so they stay in alignment when new entries are added in above them.?
Also when menu choices B1 has a value greater than empty I want attending sheets C1 to be set to a value of "Yes".
how do I do these things?

From the sample worksheet you provided, I can see that you have switched the columns as suggested. After checking the workbook, I think you should also add the Deposit column on the Menu Sheet and manually update the column on that sheet.
So presume you have filled out the Menu table as below:
Enter the following formula in Cell B2 in your Attending table, and drag it across to Column D and drag it down to the end of the table.
=IFERROR(IF(VLOOKUP($A2,Table2,COLUMN()+1,0)>0,"Yes","No"),"")
And enter the following formula in Cell G2 in the Attending table, and drag it down to the end of the table.
=IFERROR(VLOOKUP(A2,Table2,6,0),"")
Please note Table2 in the above formulas are the name for the table on your Menu sheet. Please replace it with the actual table name if needed.
Once done, you should have the following on Attending sheet:
Let's say later on you need to update the Menu table for AMC as below:
Your Attending table should be updated automatically as below:
---------------- EDIT #2 ----------------
As requested, I have changed Column F on the Menu Table to Amount Paid instead of Deposit, which allows the user to input the actual dollar value paid instead of the word Paid/Unpaid.
Then replace the formula in Cell G2 and H2 on the Attending Table as below, and drag them down to the last row of the table.
=IFERROR(VLOOKUP(A2,Table2,6,0),"")
=IF([#[Price:]]="","",F2-G2)
Then you should have the Amount Paid and Balance to Pay showing correctly on the Attending Table. It may not be necessary to maintain a separate column showing whether a fixed deposit is paid or not as long as it is not mandatory to pay a fixed amount up front.
Conclusion, it is A good practice to keep all manually updated data in one place, and keep all formula-driven data in another. Do not mix them up so you will not encounter the problem of hard-coded data entry does not match with formula-driven result.

Related

How to automate a spreadsheet so that changing a value in one cell allows that entire row to appear in a separate tab of the worksheet?

Say I have a spreadsheet, as shown below:
Is there some kind of tool, add-in or formula, that would allow me to take all of the rows that are in 'July', and put them in a table in a separate tab:
In such a way that if I changed say 'COA' (the first row in the first picture) from January to July, it would automatically update the separate table to include this?
(Or at least be updateable with a click of a button or by refreshing)
My boss has asked me to see if this is possible, and I have no idea of how to go about it.
Thanks
It is possible.
In order to extract multiple items from a list you can use the INDEX function with SMALL to create an array formula.
Try the formula below. It assumes that the first column is A and column F contains the months.
=IFERROR(INDEX($A$2:$F$300,SMALL(IF(($F$2:$F$300="July"),ROW($A$2:$F$300)-1),ROW(1:1)),1),"")
IMPORTANT: use CTRL+SHIFT+ENTER when entering this formula to make it an array formula. You then need to auto fill down to get all the July records. This formula pulls data from column 1 (that's the last 1 in the formula). If your code in column 1 is unique to each row you can use a VLOOKUP to get the other columns. If it's not then you can copy the formula to the next column. And change the 1 at the end to 2..3 etc.
Instead of putting July in the formula you can reference a cell that contains July and then duplicate the sheet and change the cell to August or simply change the cell whenever you like to see data for different months.
It's not an easy formula to follow but it does work.
You could try doing a Pivot table with all the columns expect month in the rows section, using tabular view, no subtotals, and repeat item labels. Then put month in the filter section. Then you can update the pivot table by right click refresh or by clicking the refresh all on the data tab

If value appears on master sheet, insert corresponding data into second sheet.

I have two worksheets that list the billing and client information and which employee managed that deal. The first sheet is the Master sheet that all of the deals go into. The second set of sheets belong to each individual employee to track their deals over the year. I need a formula that will allow me to input the deal and client data into the Master Sheet, and then will automatically copy that data into each individual employee's sheet if they participated in the deal.
The Master sheet looks like this:
Client Fee Employee
Client 1 $50 Lauren
Client 2 $60 Alison
Client 3 $40 Lauren
I would then need the "Lauren" spreadsheet to automatically update like this:
Client Fee
Client 1 $50
Client 3 $40
and the "Alison" spreadsheet to automatically update like this:
Client Fee
Client 2 $60
I don't think index/match or VLOOKUP will work in this case, because there will be several different client names associated with each employee name, so there's not a unique value to match on. Any help would be greatly appreciated!
This answer assumes:
The data on the master are in columns A, B, and C.
Row 1 on the master has the headers (Client, Fee, Employee) and the data begin in row 2.
The master sheet is in fact called 'master'.
Now follow these steps:
Create a new sheet. You can name it anything (perhaps Lauren).
In cell A1 type Lauren.
In cell A3 type Client. In cell B3 type Fee.
Select the range A4:B4 and in the Formula Bar paste this formula:
=IFERROR(INDEX(master!$A:$B,SMALL(IF(master!C$1:C$9999=$A$1,ROW(C$1:C$9999)),ROW(1:1)),{1,2}),"")
This is an array formula and must be confirmed with Ctrl+Shift+Enter.
Now with those two cells still selected, copy them. Then select a range below them (two columns wide and as deep as you like) and paste.
This worksheet is now Lauren's report.
Right-click the tab at the bottom of the sheet, and select Move or Copy.
Check Create a copy. Then select (move to end) from the list, and click OK.
Rename the new sheet anything (perhaps Alison).
In cell A1 type Alison.
Make a new sheet for each additional employee.
The formula given above assumes the master sheet will never have more than 9999 records. If that is incorrect then edit the formula changing the 9999's to a larger number.

Excel Formula to mark X if two values are found

I have a spreadsheet that lists pieces of equipment with columns for the type of equipment and their city location etc. Each region (made up of multiple cities) has a sheet for all of their equipment.
I am trying to set up a sheet that summarizes which equipment is located in which city.
I have been trying to set up a formula that will look at Sheet2 and the column for location and the column for the equipment type and if the city matches say Adelaide and also matches Bench Shears then mark with an X.
I have tried using a =IF(ISNA(VLOOKUP formula but I can only get it to work with one variable and not 2.
Any help or suggestions would be greatly appreciated!!
Each region (made up of multiple cities) has a sheet for all of their equipment.
That does not sound like good data architecture. As the golden rule, all your data input should be in ONE sheet. Then you can build reports on that data on other sheets.
With the info you provide above, it looks like a better data structure might be a sheet with a table. The table would have columns for Region, City, Equipment Type.
This is a flat, two-dimensional table. Each piece of equipment goes into its own row. No blank rows, no blank columns. Use Excel's Table feature to make this a table with Ctrl-T.
Now you can create a pivot table. Click a cell in the data table and then Insert ribbon > Pivot table. Drag Region into the Rows area, drag City into the rows area, drag Equipment Type into the rows area and again into the Values area.
This is a simplified example. If you need more help to get this to work, please edit your question and post a sample file.
Are you trying to make a table of the listed values in sheet2, such that cities will be listed in a column and equipment listed in a row, with an x appearing in a cell where the city and equipmnt exist? If so then add a third column to your data in sheet 2:
=A1&B1
for all values in the list, then lookup the two values in each cell in you tabulated data in sheet 1:
=IF(ISNA(VLOOKUP($A2&B$1...
and use this in all the cells in the table. The dollar signs mean that the column $A and row $1 will not change when you copy the formula across the table.
You need to get all of the data from each region in a single list...

Excel table find and copy cell values

I have a table series of tables with 3 columns which record the location of items. Eg table A, A1, A2.... B, B1 etc. etc.:
Each table contains the following columns:
Customer eg. 2. Description and 3. Spec. Number
I recently audited the physical shelves and created the same table alongside the old table in an excel spreadsheet. This new table only has data in the spec. Number column and contains less entries as some of the items on the shelf have been removed. The tables are not aligned on the same rows. i.e. not directly across from each other.
What I would like to do is create a formula to find for example spec number 12345 in the old table and copy the customer and description in the old table which is in the 2 cells to the left of the spec number into the two cells to the left of the new table I have for 12345?
This is fairly complicated but I would think is doable? This is a screen grab of what I am trying to do:
As you can see 4780 was in the shelf when I did the stock take and I only took down the spec. number to be quick. Now I want to copy the customer and print design details over from the 4780 in the table on the left automatically and do this then for the rest of the spreadsheet if possible.
Seems:
=INDEX(B:B,MATCH($J4,$D:$D,0))
met the requirements, copied one cell to the right and both formulae then copied down to suit. OP's image does not show sheet headings, but the positions assumed by the above formula are:
So the formula looks for the J4 value (4780) in ColumnD and if found the MATCH function returns the row number concerned, that then is taken by the INDEX function to determine the relevant cell in ColumnB from which to output the content.
The third parameter in MATCH is 0 to require exact matching only.
The #N/A results could be suppressed by wrapping the formula in IFERROR.

Relational coding

I have two Excel sheets. There are some materials with their prices in the first sheet and each material has a code. In the second sheet we have some products. Each product needs one or more than one material (as in the first sheet).
I want to connect these sheets. I should be able to enter the material code in the second sheet and the name of the material should appear automatically. Also I'm entering the quantity of materials for each product and the cost should be calculated too.
Note:
I'm a programmer and know that this is so easy to handle in Access. But I want to do it in MS Excel.
With a layout as shown in the example and the range in Sheet1 named array =VLOOKUP(A2,array,2,FALSE) should show in ColumnC the value from the Sheet1 cell immediately to the right of the value as specified in A2 (of Sheet2). The same formula in D2 with ,2, replaced ,3, should give the corresponding unit price, so appending *B2 should give the Cost. Both formulae may be copied down to suit:

Resources