Morning all, I have a question I'm hoping someone can help me with a formula for. I'm trying to return a value from Sheet2 into Sheet1 based on two different criteria. For example:
Sheet1:
Lvl
Amount
ID
1A
$
001
2B
$
002
2C
$
003
1B
$
001
Sheet2:
Lvl
001
002
003
1A
$300
$275
$250
1B
$200
$175
$150
1C
$100
$75
$50
2A
$350
$325
$315
2B
$250
$225
$210
2C
$150
$125
$110
So on Sheet1, if the first column value matches the Sheet2 first column value, then return the value in that row for the correct ID. The completed would be:
Sheet1 (completed):
Lvl
Amount
ID
1A
$300
001
2B
$225
002
2C
$110
003
1B
$200
001
I'm stumped on how to do a multiple lookup like this though and on what formula would go in Sheet1 in the Amount column. Also, I can't use VBA as it is blocked by my company.
Any help would be appreciated!
I would use HLOOKUP and MATCH.
=HLOOKUP(C2,Sheet2!$A:$D,MATCH(A2,Sheet2!$A:$A,0))
MATCH will return the row index of the Lvl that you are looking for. HLOOKUP needs the row index to look in, and it will use the ID number as C2 to find that in the table columns.
Related
This is a reporting presentation exercise...
I am looking for the magic to change the colour of the cell without changing the contents of the cell.
I have a type of crosstab table, which has the ROWS individual CustomerIDs, and the COLs as months.
PRESENTATION TABLE
CustomerID
Jan 22
Feb 22
Mar 22
0001
$100
$50
$10000
0002
$1000
$1000
$200
....
....
...
And in a separate table, I have some data which I want to use in a conditional formatting type of way.
LOOKUP TABLE
CustomerID
Period
Label
0001
Feb 22
Applied
0001
Mar 22
Pending
0006
Mar 22
Approved
0009
Dec 23
Pending
Let's say that if the CustomerID and Period in the data table has the label "Applied" then I want that cell in the top table, where CustomerID and Period intersect, to be coloured RED. If it's "Passed", I want it to be coloured green, and so on.
The periods are dates data types. The tables are excel tables.
The dollar value in the cell has nothing to do with it.
I've seen some techniques where a combination of Named ranges and confditional formatting are used, but I'm stumped.
I can put the dollar values in the correct cell by putting a helper column into my source data (the second table) and then doing an xlookup on the combination of the row and col headers, against that helper column.
But then I run out of steam.
END RESULT
CustomerID
Jan 22
Feb 22
Mar 22
0001
RED
BLUE
0002
....
....
...
Conditional Formatting On Two Criteria In A Separate Table
This is what I have tried,
• Formula used in Conditional Formatting for Applied
=COUNTIFS($F$2:$F$5,$A2,$G$2:$G$5,B$1,$H$2:$H$5,"Applied")=1
Special credit to Scott Craner Sir for the above formula
• And for the Pending you may try using SUMPRODUCT() or COUNTIFS() Function as well, both way it works,
=SUMPRODUCT(($A2=$F$2:$F$5)*(B$1=$G$2:$G$5)*($H$2:$H$5="Pending"))=1
I have to pull account reports out of a system but the regions are represented as a number. I have a separate list that has two columns, one with the region name and one with the corresponding number. I'm looking to write a formula that identifies the number in the report column and populates it with the region name from my static table.
Example:
Region List
A1 B1
1 00 London
2 01 West Midlands
3 02 Greater Manchester
Report
A2 B2
1 Customer A 00
2 Customer B 02
3 Customer C 02
4 Customer D 01
5 Customer E 00
As mentioned, I want to populate column B2 with the data from B1. B2's numbers will corrispond with A1's numbers. It's worth mentioning that there are also some variations like 07D or 19H, so the formula would need to take that into account.
Use this function, I hope it will work.
=INDEX('Region List'!$B$1:$B$3;MATCH($B1;'Region List'!$A$1:$A$3;0))
Excel has function to remove duplicates but what if i want only first 2 records of each value in a column.
E.g. Sheet
Email Value
abc#gmail.com 23
xyz#yahoo.com 24
sns#abc.com 75
abc#gmail.com 51
lkj#asd.com 85
abc#gmail.com 95
xyz#yahoo.com 52
uhk#asj.com 95
uhk#asj.com 42
Expected Result Sheet
Email Value
abc#gmail.com 23
xyz#yahoo.com 24
sns#abc.com 75
abc#gmail.com 51
lkj#asd.com 85
xyz#yahoo.com 52
uhk#asj.com 95
uhk#asj.com 42
Note that "abc#gmail.com 95" record which was third entry for the email id was removed. All other records has either one or two entries. No record is allowed for more than two entries. I have thousands of these in a sheet and need to only have first two entries of each email. Can anyone tell me how i can i delete more than 2 records as in above example?
create a helper column with the following formula:
Assuming "abc#gmail.com" is in cell A2, enter this formula in cell C2
=Countif($A$2:A2,A2)>2
This will result in a TRUE/FALSE value. Copy/Fill down the formula to the bottom of your list.
Since this formula returns TRUE for the first two instances of the email address, all of your FALSE values can be deleted from your worksheet.
In Row1 on sheet1 I insert ID, Description, Amount
ID will have values such as:
01
02
03
01
02
04
01
On a separate sheet I would like to show only the rows which have ID 01.
I would like this automatic, without using filter, or VBA
Is there any particular equation?
I believe dLookup should do the trick
This question already has answers here:
Check if Cell value exists in Column, and then get the value of the NEXT Cell
(3 answers)
Closed 8 years ago.
Column 1 in my spread sheet contains text (just 1 word), 2nd column numbers and column 3 will have those numbers in specific order.
Example:
cell values
A3 aaaa
A4 bbbb
A5 cccc
A6 dddd
A7 eeee
A8 ffff
B3 11
B4 22
B5 33
B6 44
B7 55
B8 66
I want cell C3 to search the whole column A for a word ffff and once it found it, it would copy a value of the cell next to it in column B. So if the word ffff was in cell A8 the cell C3 would be 66 as B8=66. If ffff was in A5 than C3 would be 33 etc. After that I want C4 to find a word cccc in column A and copy value from next cell in column B and so on. Does anyone know how can I do it? Can this be done without using macros?
You can use VLOOKUP function, e.g. in C3
=VLOOKUP("ffff",A:B,2,FALSE)
the 2 tells Excel to return the value from column 2 of the specified range (A:B) and FALSE means that only exact matches are considered - see Excel help for more on VLOOKUP