Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the below data (Table 1) in EXCEL
The identifier column indicate whether row is country or city.The Data columns indicates the data and comments indicates the Comments
Identifier | Data | Comments |
Country | Japan | comments Japan |
City | Tokyo | comments |
Country | Spain | comment |
City | Madrid | City Madrid |
Country | France | France country Paris City |
City | Paris | City Paris |
I want to display data in below format
Where the based on identifier the data column is displayed in Country,City and comments column.
If the country name found in Comments then 1 is displayed in Country count column.
If the city name found in Comments then 1 is displayed in City count column.
Country | City | Comments_Country | Comments City | Country Count | City count |
Japan | Tokyo | comments Japan | comments Tokyo comments | 1 | 0 |
Spain | Madrid | comment | City Madrid | 0 | 1 |
France | Paris | France country Paris City | City Paris | 1 | 1 |
Total | 2 | 2 |
Please Suggest
Expressions :
Sum(If(Comments_Country Like '*'&Country&'*',1))
Sum(If(Comments_City Like '*'&City&'*',1))