• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA code for Subtracting columns based on index column

rahulgupta335

New Member
Hi All,

I am very new to vba Coding. I am looking for help for writing a vba code which can handle below :

India A B C D China E F test G

5 6 7 8 9 10 11 12 13 14

6 7 8 9 10 11 12 13 14 15

7 8 9 10 11 12 13 14 15 16

8 9 10 11 12 13 14 15 16 17

9 10 11 12 13 14 15 16 17 18

10 11 12 13 14 15 16 17 18 19


now we want output as :


India A B C D China E F test G

5 A-India B-India C-India D-India 10 E-China F-China 13 G-test

6 A-India B-India C-India D-India 11 E-China F-China 14 G-test

7 A-India B-India C-India D-India 12 E-China F-China 15 G-test

8 A-India B-India C-India D-India 13 E-China F-China 16 G-test

9 A-India B-India C-India D-India 14 E-China F-China 17 G-test

10 A-India B-India C-India D-India 15 E-China F-China 18 G-test


meaning to say I want subtraction value with corresponding index value.


Some point :

1. here number of index values(eg. india, china) is not fixed

2. Number of row is also dynamic.

3. number of values apart from indexx is also not fixed.


Can any one help me in this.
 
Hi, rahulgupta335!

I'm getting a little confused with the figures in your example, would you please post another example with much more different numbers? Thank you.

Regards!
 
Back
Top