Converting macro to bash script

Gents,

Please can you help me with this.

When column 49 == 2

Before

X  4714     14710  69445.00  19257.001 1218 12271  69596.00  19460.00  19478.001
X  4714     14710  69445.00  19257.001 1228 12292  69596.00  19480.00  19480.001

After

X  4714     14710  69445.00  19257.001 1218 12281  69596.00  19460.00  19480.001
X  4714     14710  69445.00  19257.001 1229 12291  69608.00  19480.00  19480.001

Need to do the following changes;
Change previous row field (substr$0,45,4)-1
Change previous row field (substr$0,72,5)+2
Change actual row field (substr$0,40,4)+1
Change actual row field (substr$0,49,1)-1
Change actual row field (substr$0,62,5)+12

Before

X  4714     14710  69445.00  19257.001 1218 12271  69596.00  19460.00  19478.001
X  4714     14710  69445.00  19257.001 1228 12292  69596.00  19480.00  19480.001

After

X  4714     14710  69445.00  19257.001 1218 12281  69596.00  19460.00  19480.001
X  4714     14710  69445.00  19257.001 1229 12291  69608.00  19480.00  19480.001

No offence but I haven't looked at VB in over 20 years, have never written Office mcros, and have no desire to start now...

Could you describe your requirements in English rather than with reference to an Excel handling library that many here would have no cognisance of.

1 Like