How to create a Boolean strings in excel with VBA Macro

satish78

Board Regular
Joined
Aug 31, 2014
Messages
218
Hi Friends,

I tried with a formula creating Boolean strings but its time consuming every time.
This is an example:
In Column, AI have list of words from A1:A50, It varies every time from A1:A50.
ColumnB AND words
ColumnC NOT words

Here I want to build Boolean strings in ColumnD.

In ColumnD, I need formula like this in image shown below while taking all keywords from A1:A50(sometimes A1:A9 or A1:A11 or A1;A13 or A1:A29 and so on) with "AND" and "NOT" words from respective columns(ColumnB and ColumnC)
Here I need Macro to display a popup box to input range of keywords(from ColumnA) to be present by default in each query/Boolean shown in image.
Jfldl

Suggestions would be highly appreciated.

https://spaces.hightail.com/space/Jfldl
 
Yes, but that's what I have.

You can write a formula to catenate each row into a single string.
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,215,064
Messages
6,122,939
Members
449,094
Latest member
teemeren

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