Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
variable formula LP23294 Excel Worksheet Functions 4 October 27th 09 07:46 PM
Using a variable in a VBA formula Colin Vicary Excel Discussion (Misc queries) 3 November 8th 05 11:39 AM
Using a variable in formula DtTall Excel Programming 2 August 15th 05 04:23 PM
Formula Variable Ronbo Excel Programming 3 March 4th 04 09:33 PM
Variable in a formula GM[_2_] Excel Programming 6 March 3rd 04 06:27 PM


All times are GMT +1. The time now is 03:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"