I need a strange and specific macro and excel formula! Anyone, who knows?

excelnotknow

New Member
Joined
Jun 12, 2009
Messages
7
Hi!

I am creating a very interesting thesaurus (words and their synonyms) for a script that I am developing!

Why I need excel, when it is in .php? Well, that's a good question!

What I need for the .php script is this format:

" A " => " B ",

where A and B are the word (A) and its synonym (B)!

Now... I need a macros or a formula that creates the whole thing! It must be:

"spaceAspace"space=>space"spaceBspace",

The spaces are very important, because without spaces, the php script WON'T WORK!

Let me illustrate it in a simpler way:

Let's say, I have the word "find" and the synonym "locate"

I want it that way:

" find " => " locate ",


I want the macro (or formula, or anything that can help... I don't know almost anything about Excel to be honest!) to make that automatically with all words, means I don't wanna add it 85000 times (the thesaurus is at least 85000 words)!

Can this be done? Or can at least be done the " A " and " B " parts with the so important SPACES?

Then, I will only have to do the "=>" part manually!!!

Can this be done? What code or macro, or formula do I need for one or any of these operations?

Please, HELP!!!

Thanks!
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
If word 1 is in A2 and word 2 is in B2, try

=""""&" "&A2&" "&""""&" => " & """"&" "&B2&" "&""""

in C2

PS I suggest you copy & paste formula.

the """" (4 x ") actually adds " to a string - don't ask why, it just works!
 
Upvote 0
Allright... When I wrote monkey in A2 and peanut in B2, and the formula in C2, it turned into: " monkey " => " peanut "

However, I need this not only once! I need it for around 85000 words and synonyms... How can it be done.

Let's say that I paste all the *words in A and all the *synonyms in B and I have the result in C, right?


How can I do that automatically for all rows in A and B column?
 
Last edited:
Upvote 0
Allright... When I wrote monkey in A2 and peanut in B2, and the formula in C2, it turned into: " monkey " => " peanut "

However, I need this not only once! I need it for around 85000 words and synonyms... How can it be done.

Let's say that I paste all the *words in A and all the *synonyms in B and I have the result in C, right?


How can I do that automatically for all rows in A and B column?
 
Upvote 0
WOW! I just used copy>paste special>formulas and it copied the formula automatically to the other cells!!!

Thanks for the advice! Great help! Problem SOLVED!!! :biggrin:
 
Upvote 0
Only one more thing...

How can I automatically add (,) at the end of the formula?

I just forgot that!!! Sorry... The script wants it and it wants this format:


" A " => " B ",

" C " => " D ",

I mean that it needs comma after each row...

How can it be added to the formula that you provided???
 
Upvote 0
LOL!!! I just found help and did it alone...

The formula now looks:

=""""&" "&A2&" "&""""&" => " & """"&" "&B2&" "&""""&","

" A " => " B ",

JUST AWESOME!!!

Thanks for your help so much!!!

I have also some Ms Access issues... Are you familiar with MsAccess???
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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