Relational coding - excel

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:

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 formula to get specific data that according to another column

I have a spreadsheet that contains various sheets, each sheet contains different types of orders including items, descriptions, quantity, etc.
ITEM DESCRIPTION QTY
Apple ... 1
Orange ... 4
I would like to get a formula that is capable to find out the total quantity of items from every sheet.
If you want to do it in a single cell, I'm afraid the only way of doing so without VBA is to make a manual search over all the pages :
= SUMIF(Page1!A:A,"=ItemName",Page1!C:C)+ SUMIF(Page2!A:A,"=ItemName",Page2!C:C)+ ...
Other solutions would involve you creating your own personal vba function or adding new cells in each sheet which I'm not sure are within the realms of possibilities.
If all your sheets with "data" on them are the same format, you can save time and maintenance by doing the following:
create a sheet called start which is before all the "data" sheets. This sheet should be blank (except perhaps for a bit of text saying "this sheet is intentionally blank")
create a sheet called end which is after all the "data" sheets.
Then in your summary sheet, you can do =SUM(start:end!C:C) (I'm assuming your quantity is in column C from your example above).
If you use this approach, you can easily add sheets in between start and end; the formula will not need to be rewritten
Per #l3echod's comment in another answer, you can also use this pattern in SUMIF and SUMIFS formulae, if you want total quantity per item:
=SUMIF(start:end!$A:$A,$A2,start:end!$C:$C)
this assumes the item in question is in cell A2. Note that depending on the volume of data you have, this might be a slow formula to calculate.

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

calculate using google spreadsheet, using what is in a column to get a value from another sheet

I need to use a character-based field to obtain a number from a different sheet to be used in a sum with a column from the first sheet.
I have a sheet in google spreadsheet that has the columns:
Vets, number of males, and cost.
I need to have a SUM that will multiply Vets * number of males to provide cost.
BUT the info in vets will be character-based - i.e. Jones, for vet's names - and in another sheet I have a list of vets with the next column having a cost - i.e. 36.77.
I then want to take what is in the cost column of the 2nd sheet and multiply it with the column number of males in the first sheet to give me cost in the first sheet.
Any ideas?!
This FAQ explains how to reference cells from other sheets:
Within a single spreadsheet, you can replicate data and copy it from one sheet to another by entering the sheet name and an exclamation mark before the cell being copied. Here are some examples:
=Sheet1!A1
='Sheet number two'!B4
Is this example something like what you're looking for?

Fillng in excel cells automatically using data

I am wondering if and how this can be done:
I have a spreadsheet that has three columns for Highschool name, State and CEEB code.
As of now, we have to manually look up the CEEB code and fill them in.
Is there a way i can give excel the entire list of all HSs and CEEB codes, so when I enter a High School and hit tab, it fills in the CEEB code automatically if it exists in the list provided to excel.
On a separate sheet, list the highschools and CEEBs. If you put the high school name in A1, put this formula in B1
=VLOOKUP(A1,Sheet2!A1:B100,2,FALSE)
with your high schools and CEEBs on Sheet2 and in the range A1:B100. Adjust to fit your actual data. If you don't have anything in A1 and don't want to see an error, use this formula
=IF(ISBLANK(A1),"",VLOOKUP(A1,Sheet2!A1:B100,2,FALSE))

Resources