ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Text parsing HELP (https://www.excelbanter.com/excel-discussion-misc-queries/268903-text-parsing-help.html)

jdavistdi

Text parsing HELP
 
Hello,

I'm looking to extract text (and numbers) from one column and move them to the adjacent one. I definitely consider myself a novice when it comes to Excel. Here's the gist of what I'd like to do, the data in the column looks as follows:

High / CVSS Base Sco 7.5
CVE: CVE-2010-0219
BID: 44055
Other references: CERT:989719

I want to take just the information following the "CVE:" and extract it to the next column. The trick is that the numbers in the string change and are not constant. For example, in one row, it could be CVE-2010-0219 and the next row, it would be CVE-2008-0312.

What's the best way to do this? I have Excel 2010.

wickedchew

Quote:

Originally Posted by jdavistdi (Post 963047)
Hello,

I'm looking to extract text (and numbers) from one column and move them to the adjacent one. I definitely consider myself a novice when it comes to Excel. Here's the gist of what I'd like to do, the data in the column looks as follows:

High / CVSS Base Sco 7.5
CVE: CVE-2010-0219
BID: 44055
Other references: CERT:989719

I want to take just the information following the "CVE:" and extract it to the next column. The trick is that the numbers in the string change and are not constant. For example, in one row, it could be CVE-2010-0219 and the next row, it would be CVE-2008-0312.

What's the best way to do this? I have Excel 2010.

Let's say that in A1 it holds CVE: CVE-2008-0312. Your formula should be:

=RIGHT(A1,LEN(A1)-5)

jdavistdi

Quote:

Originally Posted by wickedchew (Post 963053)
Let's say that in A1 it holds CVE: CVE-2008-0312. Your formula should be:

=RIGHT(A1,LEN(A1)-5)

Thanks for the quick reply! Can you clarify how the formula above will find the "CVE:" specific text in the cell as opposed to all the other text that is there?

Thanks again.

wickedchew

Quote:

Originally Posted by jdavistdi (Post 963054)
Thanks for the quick reply! Can you clarify how the formula above will find the "CVE:" specific text in the cell as opposed to all the other text that is there?

Thanks again.

You can only apply the formula if the cell only contains "CVE: xxx."

But if the cell contains this information:

High / CVSS Base Sco 7.5
CVE: CVE-2010-0219
BID: 44055
Other references: CERT:989719

You need to use another formula:
=MID(B1,FIND("CVE: ",B1)+5,13)

jdavistdi

Quote:

Originally Posted by wickedchew (Post 963080)
You can only apply the formula if the cell only contains "CVE: xxx."

But if the cell contains this information:

High / CVSS Base Sco 7.5
CVE: CVE-2010-0219
BID: 44055
Other references: CERT:989719

You need to use another formula:
=MID(B1,FIND("CVE: ",B1)+5,13)

Thanks, that seems to be doing the trick! One other question, what if I wanted to add IF ERROR to get disregard any cells that don't have the text above? How do I add it to the formula you have? Is it something like: =IFERROR(D116:D2786,"NA")?

jdavistdi

Quote:

Originally Posted by wickedchew (Post 963080)
You can only apply the formula if the cell only contains "CVE: xxx."

But if the cell contains this information:

High / CVSS Base Sco 7.5
CVE: CVE-2010-0219
BID: 44055
Other references: CERT:989719

You need to use another formula:
=MID(B1,FIND("CVE: ",B1)+5,13)

Thanks, that seems to be doing the trick! One other question, what if I wanted to add IF ERROR to get disregard any cells that don't have the text above? How do I add it to the formula you have? Is it something like: =IFERROR(D116:D2786,"NA")?

jdavistdi

Quote:

Originally Posted by wickedchew (Post 963080)
You can only apply the formula if the cell only contains "CVE: xxx."

But if the cell contains this information:

High / CVSS Base Sco 7.5
CVE: CVE-2010-0219
BID: 44055
Other references: CERT:989719

You need to use another formula:
=MID(B1,FIND("CVE: ",B1)+5,13)

Thanks, that seems to be doing the trick! One other question, what if I wanted to add IF ERROR to get disregard any cells that don't have the text above? How do I add it to the formula you have? Is it something like: =IFERROR(D116:D2786,"NA")?

jdavistdi

Quote:

Originally Posted by wickedchew (Post 963080)
You can only apply the formula if the cell only contains "CVE: xxx."

But if the cell contains this information:

High / CVSS Base Sco 7.5
CVE: CVE-2010-0219
BID: 44055
Other references: CERT:989719

You need to use another formula:
=MID(B1,FIND("CVE: ",B1)+5,13)

Thanks, that seems to be doing the trick! One other question, what if I wanted to add IF ERROR to get disregard any cells that don't have the text above? How do I add it to the formula you have? Is it something like: =IFERROR(D116:D2786,"NA")?

jdavistdi

Quote:

Originally Posted by wickedchew (Post 963080)
You can only apply the formula if the cell only contains "CVE: xxx."

But if the cell contains this information:

High / CVSS Base Sco 7.5
CVE: CVE-2010-0219
BID: 44055
Other references: CERT:989719

You need to use another formula:
=MID(B1,FIND("CVE: ",B1)+5,13)

Thanks, that seems to be doing the trick! One other question, what if I wanted to add IF ERROR to get disregard any cells that don't have the text above? How do I add it to the formula you have? Is it something like: =IFERROR(D116:D2786,"NA")?

jdavistdi

Quote:

Originally Posted by wickedchew (Post 963080)
You can only apply the formula if the cell only contains "CVE: xxx."

But if the cell contains this information:

High / CVSS Base Sco 7.5
CVE: CVE-2010-0219
BID: 44055
Other references: CERT:989719

You need to use another formula:
=MID(B1,FIND("CVE: ",B1)+5,13)

Thanks, that seems to be doing the trick! One other question, what if I wanted to add IF ERROR to get disregard any cells that don't have the text above? How do I add it to the formula you have? Is it something like: =IFERROR(D116/D2786,"NA")?

wickedchew

Quote:

Originally Posted by jdavistdi (Post 963088)
Thanks, that seems to be doing the trick! One other question, what if I wanted to add IF ERROR to get disregard any cells that don't have the text above? How do I add it to the formula you have? Is it something like: =IFERROR(D116/D2786,"NA")?

=IFERROR(MID(B1,FIND("CVE: ",B1)+5,13),"")

jdavistdi

Quote:

Originally Posted by wickedchew (Post 963201)
=IFERROR(MID(B1,FIND("CVE: ",B1)+5,13),"")

Great, that did the trick.

Thanks again!


All times are GMT +1. The time now is 05:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com