multiple - on excel but need certain data

sksanjeev786

Well-known Member
Joined
Aug 5, 2020
Messages
882
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi Team,

I need only brand data i,e coke,pepsi,sprit .etc.
can you please suggest any formula to get only brads

Q- Brand imagey- Midwest- Coke
Q- Brand imagey- West- Pepsi
Q- Brand imagey- Ontrio- Sprite
Q- Brand imagey- Omha- Fanta
Q- Brand imagey- Midwest- Limca
Q Brand imagey Ontrio- Fruti


Thanks.
Regards,
Sanjeev
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Select the column
Data - Text to column - Delimited - Next - Enter hyphen as delimiter (check "Other) - Next -Select each column you don't need and check "Do not import" - Finish
or
Excel Formula:
=TRIM(RIGHT(SUBSTITUTE(A1,"-",REPT(" ",99),3),100))
and pull down
 
Upvote 0
or
Excel Formula:
=TRIM(RIGHT(SUBSTITUTE(A1,"-",REPT(" ",99),3),100))
and pull down
I would remove the '3' (instance number) in case there are more or less than 3 "-" characters, as in the final example of the sample data, even though that may have been a typo?

20 10 16.xlsm
AB
1Q- Brand imagey- Midwest- CokeCoke
2Q- Brand imagey- West- PepsiPepsi
3Q- Brand imagey- Ontrio- SpriteSprite
4Q- Brand imagey- Omha- FantaFanta
5Q- Brand imagey- Midwest- LimcaLimca
6Q Brand imagey Ontrio- FrutiFruti
Extract
Cell Formulas
RangeFormula
B1:B6B1=TRIM(RIGHT(SUBSTITUTE(A1,"-",REPT(" ",99)),99))
 
Last edited:
Upvote 0
I would remove the '3' (instance number) in case there are more or less than 3 "-" characters, as in the final example of the sample data, even though that may have been a typo?

20 10 16.xlsm
AB
1Q- Brand imagey- Midwest- CokeCoke
2Q- Brand imagey- West- PepsiPepsi
3Q- Brand imagey- Ontrio- SpriteSprite
4Q- Brand imagey- Omha- FantaFanta
5Q- Brand imagey- Midwest- LimcaLimca
6Q Brand imagey Ontrio- FrutiFruti
Extract
Cell Formulas
RangeFormula
B1:B6B1=TRIM(RIGHT(SUBSTITUTE(A1,"-",REPT(" ",99)),99))

Perfect :)

Thank you so much for your help. sir :):)
 
Upvote 0
Select the column
Data - Text to column - Delimited - Next - Enter hyphen as delimiter (check "Other) - Next -Select each column you don't need and check "Do not import" - Finish
or
Excel Formula:
=TRIM(RIGHT(SUBSTITUTE(A1,"-",REPT(" ",99),3),100))
and pull down


Perfect :)

Thank you so much for your help. sir :):)
 
Upvote 0
Hi Team,

Thank you all for the above clarification

Just wanted to check again it is possible to get only midwest, West, Omha etc.
 
Upvote 0
is possible to get only midwest, West, Omha etc.
Is your sample in post 1 how your data can be? That is, can the data actually be like that last line of your sample where there is only one "-" character, or was that just a mistake with your sample and in fact every row has 3 "-" characters placed as shown in the first 5 rows of your sample.

If the data is uniform like the first 5 then you can still use Text to Columns in a similar way to that described in post 2, or by formula try ..

20 10 16.xlsm
AB
1Q- Brand imagey- Midwest- CokeMidwest
2Q- Brand imagey- West- PepsiWest
3Q- Brand imagey- Ontrio- SpriteOntrio
4Q- Brand imagey- Omha- FantaOmha
5Q- Brand imagey- Midwest- LimcaMidwest
Extract (2)
Cell Formulas
RangeFormula
B1:B5B1=TRIM(MID(SUBSTITUTE(A1,"-",REPT(" ",99)),200,99))
 
Upvote 0
Is your sample in post 1 how your data can be? That is, can the data actually be like that last line of your sample where there is only one "-" character, or was that just a mistake with your sample and in fact every row has 3 "-" characters placed as shown in the first 5 rows of your sample.

If the data is uniform like the first 5 then you can still use Text to Columns in a similar way to that described in post 2, or by formula try ..

20 10 16.xlsm
AB
1Q- Brand imagey- Midwest- CokeMidwest
2Q- Brand imagey- West- PepsiWest
3Q- Brand imagey- Ontrio- SpriteOntrio
4Q- Brand imagey- Omha- FantaOmha
5Q- Brand imagey- Midwest- LimcaMidwest
Extract (2)
Cell Formulas
RangeFormula
B1:B5B1=TRIM(MID(SUBSTITUTE(A1,"-",REPT(" ",99)),200,99))

Awesome!!!

Thank you so much sir.

Regards,
Sanjeev
 
Upvote 0

Forum statistics

Threads
1,214,627
Messages
6,120,610
Members
448,973
Latest member
ChristineC

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top