how to insert a variable for different sentences using vba?

77 views Asked by At

i am trying to make a verbiage generator for my friend. as i see. i am having difficulties in placing an information in between sentences.. example: the choice of sentences in dropdown are: 1. i bought (A1) from (A2) last (A3). 2. i got a (A1) from (A2) last (A3). 3. i will give this (A1) to (A2) this coming (A3)

A1 was the cell where you put the name of the item A2 was the cell where you put the location A3 was the cell where you put the date

if i enter BAG on A1, MATKET on A2 and FRIDAY on A3,

whichever sentences i choose.. the variables will appear on their respective position in the sentence.

i saw some files with this kind of functions with a separate worksheet for the source. it goes something like this..

1 i bought Var_item from Var_location last Var_date. 2. i got a Var_item from Var_location last Var_date. 3. i will give this Var_item to Var_location this coming Var_date.

and whenever i choose a sentence, it will automaticaly replace the Var_xxxx to the information i entered.

can someone please teach me how to do this? thank you very much!

0

There are 0 answers