Excel Formula to mark X if two values are found - excel

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...

Related

How to keep data together in 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.

Excel Creating New Sheet with Summed Data from related sheet

Lets say I have the following on a sheet.
By some means, I want to either replace this, or preferably, create a new sheet, with the following data. Notice, that PO# is out of the picture, and a summation is done on rest of the fields. Is there a way to easily do this?
The end result has to be data in excel grid like below (preferably on a new sheet). This can possibly be some macro or some other technique I can use to easily create this....
You can easily do this with SUMIFS() or a Pivot Table.
For SUMIFS() the below equation will give you the sum for W.PS123 Product A. Modify as needed for your other criteria by swapping AR and product number (both housed in quotes in below formula, you can also set these equal to a cell range that contains desired criteria).
If you have a set number of "ARs" and Product Numbers, you will only need to build this table once and the equations will automatically update as your raw data changes.
=SUMIFS(C:C,A:A,"W.PS123",E:E,"A")
Alternatively, you can build a pivot table and just refresh this every time your data updates (or create a worksheet_change macro to refresh the table automatically when your data changes).
To build your pivot:
Highlight your table array (In your example, Col A-D)
Insert > Pivot Table
Drag AR to Rows
Drag PRODUCT to Rows (Below AR)
Drag QTY to "Values" and change the field to "Sum" rather the default count
Format to taste

Extract Pivot Table Row Label (not value)

In Excel 2010, I have a pivot table, in compact form, with 3 Row Labels (that represent a management hierarchy). Which of the 3 management levels is displayed in a particular row will change from day to day. (The source data is on another spreadsheet with the fields Manager L3, Manager L2 and Manager L1 in columns with John Smith, Gary Glen and Bob Stevens under them, respectively.)
In the column next to the pivot table, I need to capture which row label is being shown.
Pivot Table example
Is there a formula I can use to produce that info?
Let me know if you need more information. Thank you in advance.
Like I said above, I believe your solution would be to create an array on another (hidden) sheet like:
Then run a VLOOKUP to it: =VLOOKUP(A45,Sheet1!$A$1:$B$6,2,FALSE)
You'd put that formula in cell B45 on your sheet and drag down.

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