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

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)

Related

Filter a table to return a value

Let imagine, we have this table from column A to C
A
B
C
Date
Name
Price
10/01/2020
aa
5
10/01/2020
bb
5
15/01/2020
aa
5
Now I have two lines :
F
G
H
12/01/2020
aa
?
16/01/2020
aa
?
How can I automatically fill the "?" next to the two lines ?
There is two criteria :
column G must match column B (easy with INDEX and MATCH)
select the dates larger than F and finally, the smallest date.
Formula for H1 is
=SUMIFS($C$2:$C$4,$A$2:$A$4,MINIFS($A$2:$A$4,$A$2:$A$4,">="&F1,$B$2:$B$4,G1),$B$2:$B$4,G1)
Then copy to H2. It returns 0 for H2 since 16/01/20 is greater than all of the dates in column A.
With Office 365 dynamic arrays:
=#SORTBY(FILTER($C$2:$C$5,($A$2:$A$5>F1)*($B$2:$B$5=G1),""),FILTER($A$2:$A$5,($A$2:$A$5>F1)*($B$2:$B$5=G1),""))
If one has LET() it can be shortened to:
=LET(dt,$A$2:$A$5,x,(dt>F1)*($B$2:$B$5=G1),#SORTBY(FILTER($C$2:$C$5,x,""),FILTER(dt,x,"")))

Conditional formating for spreadsheet with if, and, then

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

Highlight cells based on the value of cells in another column

I have this problem as noted below:
Column A = Part number
Column B = Quantity
Column C = Part number
Column D = Quantity
Using conditional formatting, I would like to highlight if the combination of Part number and Quantity in Column A and B is different to the combination of Part number and Quantity in Column C and D.
Eg:
Col A Col B Col C Col D
1 1111 2 1112 5
2 1112 3 1111 2
3 1131 5 1112 5
4 1122 3 1131 2
To do this, I'd like to set up a couple of 'helper' columns (say E & F) by concatenating Column A & B, C & D.
So essentially, I'd like to take the information from the helper columns E & F, but use conditional formatting to highlight the cell in column B and D.
From the example above, cell B3 and D4 would be highlighted.
Is this possible, and if not, is there are simple alternative? (I don't mind using a macro if need be).
I would use COUNTIFS
For B1:B4
=COUNTIFS($C$1:$C$4,A1,$D$1:$D$4,"<>"&B1)
and for D1:D4
=COUNTIFS($A$1:$A$4,C1,$B$1:$B$4,"<>"&D1)
In case you even want to skip the helper columns, you could format A1 with =$A1&$B1<>$C1&$D1 and copy the format to any cells in you want to be highlighted (even to your helper columns).

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

Match value based on criteria in two columns

I have the following values in columns A, B and C.
A B C D
3 3 5
4 4 10
In cell D1, how can I find the value in Column C where A=A+1 and B=B+1 i.e. 10?
Are you looking for something like below?
=VLOOKUP(SUM(A1+1,B1+1),C:C,1,FALSE)

Resources