Condition from matches in two column Excel - excel

I am working on a excel like this
I would like to create a condition from second table using matches between two tables columns values (Tool and tools) to automatically replace the column Unit prince
I want this result
<table>
| Tool | United Price |
| : ---|:------------:|
| Axe | 5,9 |
| : ---|:------------:|
| Axe | 5,9 |
| : ---|:------------:|
| Hoe | 9,1 |
| : ---|:------------:|
| Drill| 7,8 |
| : ---|:------------:|
| Hoe | 9,1 |
| : ---|:------------:|
| Hoe | 9,1 |
| : ---|:------------:|
| Drill| 7,8 |
</table>
I tried to use VLOOKUP(A2; E2:F4; 2; FALSE), but it's don't work

I think you want to use a Lookup function in the United Price cells. I’d suggest making both of them tables. From the image it just looks like loose cells but with tables you can use structured references to make the formulas cleaner and easier to maintain.

Try:
=VLOOKUP(A2; $E$2:$F$4; 2; FALSE)
This will fix the position of the lookup array.

Related

I want to count IF both condition are true Logically count by AND excel

I have two Columns both are categorical columns. Like Age_group and Engagement_category. And I want to get count no. of each engagement_category in each Age_group.
This is like GROUP BY function in SQL.
| Engagement_category | Age_group |
|:-------------------:|:---------:|
| Nearly Engaged | 21-26 |
| Not Engaged | 31-36 |
| Disengaged | 36-41 |
| Nearly Engaged | 21-26 |
| Engaged | 21-26 |
| Engaged | 26-31 |
I tried Excel COUNTIFS function but it is showing the count of each unique value in the criteria range that I have provided.
Expected OUTPUT is something like this.
| Age_group | Engaged | Nearly Engaged | Not Engagaged | Disengaged |
|:---------:|:-------:|----------------|---------------|------------|
| 21-26 | 1 | | | |
| 26-31 | | | | |
| 31-36 | | | | |
| 36-41 | | | | |
| 41-46 | | | | |
| 46-51 | | | | |
Thanks!
Use COUNTIFS function, see document: https://support.office.com/en-us/article/countifs-function-dda3dc6e-f74e-4aee-88bc-aa8c2a866842
Please try:
=COUNTIFS(B:B, "21-26", A:A, "Engaged")
Try inserting a pivot table:
Highlight the source data which is the 2-Column table including headers, go to Insert tab and click the Pivot Table button, set up the Rows, Columns and Values column as below:
The key is to drag the Engagement_Category to both Columns and Values field.

Excel how to filter based on ( select columnA = ValueA) OR (select columnB = ValueB)

For example, I have a very simple excel sheet which has the layout and info as following:
| Name | English | French | Chinese | Korean |
|-------------|---------|--------|---------|--------|
| Eddie | Y | | | |
| Raymond | Y | | Y | |
| Celine Dion | Y | Y | | |
| Marion | | Y | | |
I want to filter the rows such that all filtered persons can either speak Chinese OR English
The result will be Eddie, Raymond, Celine.
Assuming that your data is in a table or that you've engaged the autofilter, I would create an extra column called ChineaseOrEnglish in which i'd create an if() statement that uses OR() to place a 'Y' in the column where either English or Chinese is flagged.
You would then be able to filter on the ChineaseOrEnglish column.

Excel, How to use average with indirect?

I've been trying to use AVERAGE with INDIRECT but keeps giving me errors.
Now I am using Average like this:
AVERAGE(Results!C2:C51)
I need to get data from another sheet "Results". But in my current sheet I got the range of the rows set in two cells.
+-------------------+
| ... E F |
| +-------+-------+
| 2 |...| 2 | 51| |
| +---------------+
| 3 | | 52|101| |
| +---------------+
| 4 | | | | |
+---+---+---+---+---+
I've tried like this, but it's not working:
AVERAGE(Results!INDIRECT("C"&E2):INDIRECT("C"&F2))
This should do it:
=AVERAGE(INDIRECT("Results!C"&E2&":C"&F2))
The answer posted by zipa is correct. Here is an alternaive that will allow you to avoid INDIRECT() entirely:
=AVERAGE(INDEX(Results!C:C,E2):INDEX(Results!C:C,F2))
This is based on Scott Craner's Answer to a question I asked previously.

Excel 2010 Calculating Production line quantities without long calculations

Program: Excel 2010
Requirements: Prefer no VBA (Macro free book)
I am creating a spreadsheet to calculate items required for components (parts). I have a list of the product, and under the number of specific parts. I have a calculation which tells me what the total parts are needed, but, is there a better way?
=($C$32*C34)+($D$32*D34)+($E$32*E34)+($F$32*F34)+($G$32*G34)+($H$32*H34)+($I$32*I34)+($J$32*J34)+($K$32*K34)
| A | B | C | D | E | F |
| Making: | | 2 | 2 | 2 | |
|---------------|-------|------------|-------------|-----------------|---------|
| Item -> | Total | Small raft | Rowing boat | Sm sailing boat | Corbita |
| | | | | | |
| Planks | 20 | 4 | 6 | | |
| Logs | 8 | 4 | | | |
| Nails - Large | 16 | 8 | | | |
| Oars | | | | | |
In the above, you can see that ($C$32*C34) = 8 & ($D$32*D34) = 12 => 12+8 = 20 (B34) (Planks Total)
Is there an easier way of doing this, or will my equation just keep getting bigger?
Thanks in advance.
As chris neilsen mentioned in his comment, you can use the SUMPRODUCT function in Excel. The formula in your cell B34 (total planks) should look like this:
=SUMPRODUCT(C32:K32,C34:K34)
This has the effect of multiplying the corresponding components in the given ranges (C32 * C34, D32 * D34, etc.) and then returning the sum of those products/multiplications.
As you add more columns, you can expand K to the last column in the range that you want to add up in both ranges.

Mapped lookup in excel without duplication

I have a very somewhat complicated question (at least to me ) and I'm hoping someone will be kind enough to help. I hope my explanation is good enough
I have a mapping table like below, we have multiple elements b mapped to element a
| Element a |Element b|
|---------------|-------- |
| B10 | 212010 |
| B101 | 212010 |
| B102 | 212010 |
| B103 | 212010 |
| B104 | 212010 |
| B301 | 111030 |
| B302 | 111030 |
| B303 | 111030 |
| B304 | 111030 |
|---------------|-------- |
Each element in the above table will have a value in another table:
| Element A | Value |
|-----------|-------------|
| B10 | 1,000.00 |
| B101 | 2,000.00 |
| B102 | 6,000.00 |
| B103 | 1,000.00 |
| B104 | 10,000.00 |
| B301 | 1,000.00 |
| B302 | 2,000.00 |
| B303 | 6,000.00 |
| B304 | 1,000.00 |
|-----------|-------------|
| Element B | Value |
|-----------|-------------|
| 212010 | 20,000.00 |
| 111030 | 10,000.00 |
|-----------|-------------|
I have to compare the value of the corresponding elements above using the mapping table, I'm looking for a solution that looks like the table below -
Steps:
Compare the value of each element side by side without duplicating element b
if possible put a box around each mapped element and value
I understand it may only be possible to the above using only VBA macros, but a similar solution using only excel formula will be very appreciated.
The solution should be compatible with Excel 2003.
Thank you very much
Insert a column after element a and insert formula:
=VLOOKUP(A2;$F$2:$G$7;2;FALSE)
$F$2:$G$7 should refer to the sheet/range of your values
the column after element b should contain the formula:
=IF(C2<>C1;VLOOKUP(C2;$F$2:$G$7;2;FALSE);"")
Then put a conditional format in for the border based on the cell in d column being empty or not.
Go to conditional formating and select "use formula"
type in formula:
$D2<>""
And select the tab border to select top border.
I would do this by sql query in excel if you have these tables in different sheets you can join them.
In sql after select statement you can type Distinct and this will delete the duplicates.

Resources