Building a sentence generator with VBA

kelly mort

Well-known Member
Joined
Apr 10, 2017
Messages
2,169
Office Version
  1. 2016
Platform
  1. Windows
Hello geniuses,

I have this challenge here that is staring at me for a while now. I have tried to ignore it but it still pays me visit.

I want to be able to use a VBA script to construct grammatically correct sentences.

For the start, I will be constructing just simple sentences.

S + V + O { Subject + Verb + Object }

For example:

1. The boy is coding.
2. He has a computer.
3. Mark likes apples.
4. I sleep at night.

My goal is to have three lists (since I am dealing with simple sentences for now) .

One list for the Verb.
One for the subject.
One for the object
The last for the articles (a, an, the) - which are logically selected by the script.

So the script will look at the lists and form the sentences.

I am sure it won't be very accurate from the start but with time, it could be improved upon.


I know this idea sounds very crazy but I want to challenge myself.

I need an access point (the start) so that I will later do more research and build upon it.

I will be glad if the Gurus here can guide me to get started.

Thanks in advance.
Kelly
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,224,822
Messages
6,181,165
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