Hi all,
I need help in doing a VBA macro. I have one Excel file where I have from B1 to B100 cells with a number (Area). Each Area is of a place number. So I have:
A B
1 100
2 300
3 150
.. ..
The .txt that I have is something like this:
SACR id 'sacr1' nm '2 ' ar "Area_here" ca '1' uh '1' op '1' ms '' aaf 1 sacr
SACR id 'sacr3' nm '3 ' ar "Area_here" ca '1' uh '1' op '1' ms '' aaf 1 sacr
SACR id 'sacr2' nm '4 ' ar "Area_here" ca '1' uh '1' op '1' ms '' aaf 1 sacr
SACR id 'sacr10' nm '5 ' ar "Area_here" ca '1' uh '1' op '1' ms '' aaf 1 sacr
SACR id 'sacr4' nm '6 ' ar "Area_here" ca '1' uh '1' op '1' ms '' aaf 1 sacr
SACR id 'sacr20' nm '7 ' ar "Area_here" ca '1' uh '1' op '1' ms '' aaf 1 sacr
SACR id 'sacr50' nm '8 ' ar "Area_here" ca '1' uh '1' op '1' ms '' aaf 1 sacr
As you can see each 'sacr1' .. 'sacr3', etc corresponds to the place number 1 and 3 in the Excel file.
So what I would like, it's a VBA macro that could read the place area in the Excel file and write it down in the perfect place in the .txt. For this example that I've write, it would be..
SACR id 'sacr1' nm '2 ' ar "100" ca '1' uh '1' op '1' ms '' aaf 1 sacr
SACR id 'sacr3' nm '3 ' ar "150" ca '1' uh '1' op '1' ms '' aaf 1 sacr
SACR id 'sacr2' nm '4 ' ar "300" ca '1' uh '1' op '1' ms '' aaf 1 sacr
I don't know if I could express myself in the better way. If not please say so.
Thank you so much for anyone that tries to help me!
Regards
Bookmarks