Macros Program to find the difference of two values
Hi Guys.,
I got stuck into a problem while using Macros. I would like to find the difference of two values in the same column if the particular criteria matches..
Actually i was trying in Excel using the formula =IF(($V$2=V3)=TRUE,J3-$J$2,"").
[TABLE="width: 144"]
<colgroup><col style="width: 48pt;" span="3" width="64">
<tbody>[TR]
[TD="width: 64, bgcolor: transparent"]City[/TD]
[TD="width: 64, bgcolor: transparent"]Temperature [/TD]
[TD="width: 64, bgcolor: transparent"]Difference[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]India[/TD]
[TD="bgcolor: transparent"]50[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]India[/TD]
[TD="bgcolor: transparent, align: right"]30[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]India[/TD]
[TD="bgcolor: transparent, align: right"]40[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]India[/TD]
[TD="bgcolor: transparent, align: right"]45[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Germany [/TD]
[TD="bgcolor: transparent"]10[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Germany[/TD]
[TD="bgcolor: transparent, align: right"]2[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Germany[/TD]
[TD="bgcolor: transparent, align: right"]5[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Germany[/TD]
[TD="bgcolor: transparent, align: right"]3[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
This is an example.. so if the criteria India matches, it should find the difference between 50 and 30, 50 and 40, 50 and 45 and if the criteria Germany matches, it should find the difference between 10 and 2, 10 and 5, 10 and 3.
Could some one hlep me with macros program as I'm not an IT guy.