Excel - Data Validation blank items in the list, dependency list - excel

We are looking to create a dependent list based on 2 sheets as described below.
Sheet 1:
col A: Need to choose a value from drop down referring to col country in sheet 2
col B: Need to country corresponding cities available in sheet2
Sheet 2:
col Country: USA UK India Australia
col USA cities: Boston Chicago Seattle SanDiego
col UK cities: London Manchester Edinburg Glasglow
col India cities: Mumbai Delhi Kochin
col Aus Cities: Victoria Melbourne Sydney
Typical example:
If we choose the country from drop down as USA in colA (sheet1), then the colB (sheet1) needs to show all the USA cities from "col USA cities".
I have tried using Blank Values in Excel Data Validation drop down list with data validation for col B as =Indirect($A2 & "list") (after naming the cities as lists such as USAlist, UKlist etc) but didn't help.
Also, any idea how to solve the blanks shown by the list in this scenarios?

Related

Excel Unique district ID

so I'm working on a spreadsheet with cities and districts. I want to have a unique ID for every city. For example, if in the column D1 we have California, we should have let's say an ID of TEST-001, for New York, TEST-002 and so on. If in a next row of that column we have the same city name, let's say California again, we should again display TEST-001. Do you know how to do that?
California (TEST-001)
New York (TEST-002)
Minnesota (Test-003)
California (TEST-001)
I've tried =CONCATENATE(LEFT(LEFT(M5472;25);2);"-";COUNTIF($M$2:M5472;M5472)) which creates a unique ID for every row.
Few options depending on your version of Excel. If you have ms365 this will spill down:
="TEST-"&MATCH(A1:A4,UNIQUE(A1:A4),0)

How to get first record from lookup table that is a substring of some value?

In MS-EXCEL, how can I achieve something like below:
Given:
sheet1 - raw-info ('james brown england', 'tommy australia 1234', 'saka ireland', 'denmark martin')
sheet2 - countries (england, nigeria, usa, denmark, australia)
after applying some formula, I want a new column in sheet1 that will have the following values:
sheet1 with two columns:
raw-info ('james brown england', 'tommy australia 1234', 'saka ireland', 'denmark martin')
new-col (england, australia, **blank**, denmark)
logic is:
if raw-info column value contains any value in countries column as a substring, use the matching value from countries column, else leave it blank.
In B2(assuming you have headers):
=INDEX('Sheet2'!A:A,AGGREGATE(15,7,ROW('Sheet2'!$A$1:$A$6)/(ISNUMBER(SEARCH('Sheet2'!$A$1:$A$6,B2))),1))

how to set value on one of column on excel from other sheet column on excel

I have two sheet of excel one it is sheet for products
with have column like this
id
name
barcode
description
1
opel blazer
1239423
europe car
2
toyota alphard
9239239112
japan car
3
Jeep
90232321
Jeep
this sheet has 1000item and barcode
and other it is sheet for inventory
id
product_id
barcode
location
1
????
9239239112
40
2
????
90232321
20
my question is how to set product_id at my inventory from id column from product sheet if we just has information for barcode ? so it will be use filtering and set by barcode
Try below formula-
=INDEX(products!A:A,MATCH(C2,products!C:C,0))
With Microsoft-365 can try-
=XLOOKUP(C2,products!C:C,products!A:A,"")

Arranging data in Excel

I have data in excel. I need help, to arrange it.
part of the data
I need to write for each product all of the countries where it is sold, separate the countries with " | ", For Example: if a certain product is sold in SPAIN, UK, FRANCE, BRAZIL and RUSSIA the row of this column will show: SPAIN | UK | FRANCE | BRAZIL | RUSSIA.
It's need to be in the same column....
Here is one easy way you could do it if you want to see what you're doing.
Fill column C and D, result will be in D. Column B needs to be sorted.
A
B
C
D
1
Country
Product Code Central
Country List
Formatted List
2
UKRAINE
194
=IF(B2=B1;C1&"|"&A2;A2)
=IF(B3<>B2;C2;"")
If you have a version of Excel that understands both TEXTJOIN and FILTER (the former is the most recent, available in Excel 365) the formula below will return the result you describe.
=TEXTJOIN("|",TRUE,(FILTER(A$2:A$11,B$2:B$11=D2,"None")))
Here A2:A11 has the country names, B2:B11 the product numbers and D2 any value from B2:B11.

Excel Index Partial match

I have Sheet1 with column A listing every single country in alphabetical order..
A
1 Afghanistan<
2 Albania
3 Algeria
4 American Samoa
5 Andorra
----------
228 United Kingdom
229 United States
etc
I have Sheet2 column A with empty cells with adjacent cells in column B listing address details
A B
1 empty cell Unit 3, Road;London, United Kingdom
2 empty cell Building 1, Road, TX, United States
3 empty cell 8th floor, Business Park, India 1234
etc
What I would like to know is how can I obtain the country within the address details in sheet2 column B and place them in Sheet2 column A, based on a match on the list of countries in Sheet1 column A.
Part of the problem is there is no coherent method as to how to country is placed within the address; could be at the end or in the middle of the address.
I have tried various index match formulas with no luck
any help would be appreciated.
I tried it with the reference table being in A1:B7, and lookups being A10:B10 onwards down. The formula is for these cells. You can adjust it for Sheet1/2!.
Assuming your data is in B10 onwards, and your reference data was in B1:B7, you can write this formula in A10 =INDEX($B$1:$B$7,MAX(IF(ISERROR(FIND($B$1:$B$7,B10)),-1,1)*(ROW($B$1:$B$7)-ROW($B$1)+1))). This is an array formula, so please hit Ctrl+Shift+Enter for excel to read it as an array formula.
(In the screenshot, I have pasted the table in A10:B12 as values only in D10:E12)
Text to Columns with a comma delimiter

Resources