![]() |
Help With a Variable Formula
I am trying to get a formula to check all rows in a column for a particular value and return a corresponding value. My current formula looks as so: =IF(A2='Sheet2!B3,(IF(J2='Sheet2'!I3,'Sheet2'!D3,0 )),0) I would like the formula to check all the rows in A[y] against all the rows in Sheet2!B[y+1]. Likewise all the rows in J against all the rows in Sheet2!I[y+1], and then return Sheet2!D[y+1]. I would like to find where all of the conditions are true and then sum every true value in Sheet2![y]. I have not incorporated the SUM function yet because I do not want to have to write a specific formula for each case. If I did it that way it would lose more time than it is worth and my formula would be a mile long. I am not much of a programmer so any advice would be great. Could anyone help me derive a function or show me some good VBA code that could help me solve this problem? -- jdurrmsu ------------------------------------------------------------------------ jdurrmsu's Profile: http://www.excelforum.com/member.php...o&userid=27122 View this thread: http://www.excelforum.com/showthread...hreadid=468225 |
Help With a Variable Formula
Maybe something like
=SUMPRODUCT(--(A2:A1000=Sheet2!B3:B1001),--(J2:J1000=Sheet2!I3:10001),Sheet2 !D3:D1001) -- HTH Bob Phillips "jdurrmsu" wrote in message ... I am trying to get a formula to check all rows in a column for a particular value and return a corresponding value. My current formula looks as so: =IF(A2='Sheet2!B3,(IF(J2='Sheet2'!I3,'Sheet2'!D3,0 )),0) I would like the formula to check all the rows in A[y] against all the rows in Sheet2!B[y+1]. Likewise all the rows in J against all the rows in Sheet2!I[y+1], and then return Sheet2!D[y+1]. I would like to find where all of the conditions are true and then sum every true value in Sheet2![y]. I have not incorporated the SUM function yet because I do not want to have to write a specific formula for each case. If I did it that way it would lose more time than it is worth and my formula would be a mile long. I am not much of a programmer so any advice would be great. Could anyone help me derive a function or show me some good VBA code that could help me solve this problem? -- jdurrmsu ------------------------------------------------------------------------ jdurrmsu's Profile: http://www.excelforum.com/member.php...o&userid=27122 View this thread: http://www.excelforum.com/showthread...hreadid=468225 |
All times are GMT +1. The time now is 08:54 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com