Macros program to match and find difference between two values

puppy26

New Member
Joined
Feb 23, 2012
Messages
42
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,"").

Could some one hlep me with macros program as I'm not an IT guy.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Not sure what you mean by using macro's, maybe you can post your code? The formula, I think should be:
Code:
=IF($V$2=V3,J3-$J$2,"")
 
Upvote 0
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,"").

CityTemperature Difference
India50
India30
India40
India45
Germany 10
Germany2
Germany5
Germany3



<colgroup><col style="width: 48pt;" span="3" width="64">
<tbody>


</tbody>

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.
 
Upvote 0
Re: Macros Program to find the difference of two values

Try this formula in row 2 copied down:

=IF(COUNTIF(V$2:V2,V2)>1,J2-INDEX(J:J,MATCH(V2,V:V,FALSE)),"")
 
Upvote 0
Re: Macros Program to find the difference of two values

@Andrew::
Thanks a lot.. It works so perfect..
 
Upvote 0
Re: Macros Program to find the difference of two values

Hi Andrew,
Could you please explain me the formula to understand better!

thanks in advance for your feedback..
 
Upvote 0
Re: Macros Program to find the difference of two values

First the formula checks that the entry in column V is not the first one. If so it subtracts the first value in column J for that entry from the value in the current row of column J. Otherwise it returns null.
 
Upvote 0
Re: Macros Program to find the difference of two values

I have merged your two threads together. In the future, please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread. Per forum rules, posts of a duplicate nature will be locked or deleted (rule #9 here: </SPAN>Forum Rules).</SPAN>

Thanks
 
Upvote 0

Forum statistics

Threads
1,216,030
Messages
6,128,411
Members
449,449
Latest member
Quiet_Nectarine_

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top