Is it possible to create a VBA code that would recognize phrases out of context ?

szakharov7723

Board Regular
Joined
Jun 22, 2018
Messages
85
Office Version
  1. 2019
Platform
  1. Windows
So far I know how to extract certain words and potentially even match it into phrases without using VBA, but it is very crippled.
But is it possible to teach/have VBA recognize the phrases out of text.

Example: we need to recognize when paper was not in stock

I went to store and did not find paper in stock
I went to store: paper was out of stock
I went to store and no paper in stock
No paper found in stock. I had to go to another store.

As you see we cannot just rely on finding "paper not in stock". And there are hundreds and thousands more records, that have nothing to do with paper not being stock, but can also have something else not in stock, or have paper but being used or obtained.

You can assume some other data like: only certain stocks have a paper, thus other stocks cannot have this phrases. But don't narrow it down to being very specific, as we still need to have VBA be able to recognize the phrase out of context.


Is there any other way to teach VBA recognize times when there is no paper in stock ?

Thank you
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
There's no simple way that I know of to do something like this, so I think that you are out of luck.
Adding to your examples, how would this be treated.
I went to store and bought my paper but yours was out of stock
That would be both a true & false.
 
Upvote 0
Yeah, I was suspecting something like that, but still decided to try my luck
Thank you for letting me know though.
 
Upvote 0
You could identify those phrases have one or more of these conditions ("paper" and "not") or ("paper and "no") or ("paper" "stock" and "no"). (Consider the sentence "No problem, we have paper in stock")

As Fluff alluded to, how complex are the sentences that you are looking at.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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