I wish to have a vba like : In an Excel sheet,

Step1. Click on a cell containing Alphanumeric values like A1 or AS1/2 or BS1/3 or C1/4D3/4 etc.

( note that our concern is with the end part of fractions i.e.,1,1/2, 1/3 and 3/4 in the examples as above).

Step2. Now,the code is to Horizontaly lookup and COUNT for number of occurrences of 'z' till it encounters with other alphabet/character in the row.

Step3.

If the occurrence of 'z' is once, then the cell value A1 changes to A2; [i.e.,1 for z +1 for suffix numeric of A1]

If the occurrence of 'z' is twice, then the cell value A1 changes to A3; [i.e., 2 for z +1 for suffix numeric of A1]

If the occurrence of 'z' is thrice, then the cell value A1 changes to A4; [i.e.,3 for z +1 for suffix numeric of A1]

Similarly for AS1/2,

If the occurrence of 'z' is once, then the cell value AS1/2 changes to AS3/2;[ i.e.,1 for z +1/2 for suffix fraction of AS1/2]

If the occurrence of 'z' is twice, then the cell value AS1/2 changes to AS5/2; [ i.e., 2 for z +1/2 for suffix fraction of AS1/2]

If the occurrence of 'z' is thrice, then the cell value AS1/2 changes to AS7/2; [ i.e., 3 for z +1/2 for suffix fraction of AS1/2]

Similarly,

If the occurrence of 'z' is once, then the cell value BS1/3 changes to BS4/3;[ i.e.,1 for z +1/3 for suffix fraction of BS1/3]

If the occurrence of 'z' is twice, then the cell value BS1/3 changes to BS7/3; [ i.e., 2 for z +1/3 for suffix fraction of BS1/3]

If the occurrence of 'z' is thrice, then the cell value BS1/3 changes to BS10/3; [ i.e., 3 for z +1/3 for suffix fraction of BS1/3]

Similarly for C1/4D3/4 ,

If the occurrence of 'z' is once, then the cell value C1/4D3/4 changes to **C**1/4D7/4 ;[ i.e.,1+3/4]

If the occurrence of 'z' is twice, then the cell value C1/4D3/4 changes to C1/4D11/4 ; [ i.e., 2+3/4]

If the occurrence of 'z' is thrice, then the cell value C1/4D3/4 changes to C1/4D15/4; [ i.e., 3+3/4]

Please note that only the last fraction i.e., 3/4 will change.

And so on.

Please note that the replaced fractions will be in whole fractions.

An excel sheet is appended to express my Question and desired result.