Conditional formating for spreadsheet with if, and, then - excel

So I have a chart I am trying to create conditional formatting for in excell. So I have a product order sheet and I have 2 different styles listed in column A, with multiple sizes listed in column B, and I want column C to enter the price based on the style they are ordering and the size they are ordering. How can I do that?
For example if column A is "male" and column B is "S" then column C would be $10 but if Column B is "L" then c would be $15, or if Column A was "woman" and Column B was "S" then C would be $5, etc. What I need is a formula that when I put the style in A and the size in B it will automatically enter the dollar amount for me in C. The price of the product depends on the style and the size.

If you're trying to auto-populate column C based on the values in columns A and B, then the sumifs function would be useful. You can create a master list of prices (if you don't have any already) such as
Col E Col F Col G
------- ------ ------
Style Size Price
male S 10
male M 15
male L 20
female S 12
female M 17
female L 22
Then you can take your orders list and apply the following function in cell C2.
=SUMIFS(G:G,E:E,A2,F:F,B2)
This will sum the values in column G provided that A2 matches in column E and B2 matches in column F. Here's the result.
Col A Col B Col C
------- ------ ------
Style Size Price
male L 20
male S 10
male M 15
female L 22
female M 17
male S 10
female L 22
female S 12
male S 10

Related

List items based on criterias in two different columns

I have the following Excel spreadsheet:
A B C
1 Product Sales List
2 Product A 500 Product A
3 Product B Product C
4 Product C 400 Product D
5 Product E
6 ="" Product F
7 Product D 600 Product H
8 Product E 550
9 =""
10 Product F 200
11 Product G =""
12 Product H 800
In Column A and Column B different products with their sales are listed. As you can see it can either happen that there are empty cells or cells with ="" in both Column A or Column B.
In Column C I want to achieve now that only the products which do NOT have an empty cells or cells with ="" in Column A or Column B are inlcuded in the list.
I could already make it work for Column A with this formula:
={INDEX($A$2:$A$100,SMALL(IF(LEN($A$2:$A$100)=0,"",ROW($A$2:$A$100)-MIN(ROW($A$2:$A$100))+1),ROW(A1)))}
What do I have to change in this formula to also exclude the products wich have an empty cell or a cell ="" in Column B from my list in Column C?
When you have worked it out for Column A, it is very simple to do for B:
Each cell in Column D has the appropriate function: (Example for D2)
=VLOOKUP(D2, $A:$B, 2, 0)
NOTE: This assumes you don't have repeated values in Column A
doesn't have to be an array formula. use this formula in C instead.
=IF(AND(A:2<>"",B:2<>""),A:2,"")
Then autofill the formula. Then sort column C to get all product list.
or pivot the range by column C in row box to get the distinct product list in case A has duplicate products.

How to count unique values w.r.t one column in excel?

I am trying to find the number of unique values in column B("Levels") for each value in column A("Heads").
For example for Heads "A" we have 3 unique values ("ALPHA", "BETA", "ECHO") and it should return in column "Expected Count".
Heads Levels Expected Count
A ALPHA 3
A ALPHA 3
A BETA 3
A ECHO 3
B CHARLIE 2
B CHARLIE 2
B DELTA 2
C ALPHA 4
C BETA 4
C CHARLIE 4
C DELTA 4
I need to execute the functionality for 1000's of rows. Is there any formula?
you need one new column. insert it between B and C. concatenate column a and b with formula
=a&b
then do a simple formula in column d and drag that down on your 1000's of rows
=countifs(C:C,C2)

Deducting numbers based on value in a different column

I have a C column with several rows containing numbers. I have another E Column with rankings.
I would like a formula that will automatically change the number in a 3rd column G based on the ranking in E column
So,
If the ranking is 2 in E the number in G is number in column C
minus 1
If the ranking is 1 the number in E the number in G is
number in column C minus 2
Any other ranking the number remains the
same.
Example -
C E G
19 2 18
12 1 10
15 3 15
Put below formula in G column -
=IF(E1=1,C1-2,IF(E1=2,C1-1,C1))
Above formula is for row 1. Adjust row value according to your need.
Explanation -
Check if E column contains 1, then subtract 2 from C column
Else, check if E column contains 2, then subtract 1 from C
column
Else, G column is same as C column

Excel: Arrange data for a number of column based on unsorted column

I have 4 Column of data as below ;
A B C E F G
1 99 98 2
2 97 94 3
3 93 92 1
A,B, C is a references column. I would like to grab the X and Y value in column B and C based on sequences in data E.
(To simplify the question. i would like to re-arrange B,C data to sequence like column E)
I need to know how to do this because i need to plot a link of city coordinate based on given sequence. (unsorted).
In column F, put this:
=VLOOKUP($E2,$A$2:$C$4,2)
In column G, put this:
=VLOOKUP($E2,$A$2:$C$4,3)

Compare 2 Columns values in 2 ExcelSheet

I want to compare two columns in excel 2 sheets
In sheet A Column is Gender with Numeric Value
And in sheet B Column is Gender with Alpha Value
A Gender B Gender
----------------------
1 M
2 F
2 F
1 M
2 M
1 F
Here 1 = M and 2 = F.
If A Gender is 1 and B Gender is M then correct.
If A Gender is 1 and B Gender is F then Wrong.
How to Compare the Value in Excel?
Assuming Gender data starts from A2 and goes down, type the following formula in C2:
=IF(OR(AND(A2=1,B2="M"),AND(A2=2,B2="F")),"OK","WRONG")
and autofill down as required.
Another alternative formula which might be easier to understand (and extend values if needs be)...
=CHOOSE(A2,"M","F")=B2
This formula basically reevaluates column A to be "M" when 1 and "F" when 2. Then asks if that equals Column B, and you get a TRUE/FALSE return ;)
If you have a third value for 3, just add another comma separated value onto the end of the CHOOSE function.

Resources