Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mac Mac is offline
external usenet poster
 
Posts: 213
Default A complex formula, help needed

Hello all,
please help me with a complex formula to assign to a cell; pseudocode for it
goes like: for (i = 1 to 6 ; i++){ if (( Ai == value1) AND (Di == value1))
then (for( j = 7 to 25){ if (Bj == value2) then (write XX into this cell)}
)}; although it is an obvious candidate for vba, I wonder if the procedure
can be realized via cell formulae...
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default A complex formula, help needed

On Sat, 12 Dec 2009 02:10:02 -0800, Mac
wrote:

Hello all,
please help me with a complex formula to assign to a cell; pseudocode for it
goes like: for (i = 1 to 6 ; i++){ if (( Ai == value1) AND (Di == value1))
then (for( j = 7 to 25){ if (Bj == value2) then (write XX into this cell)}
)}; although it is an obvious candidate for vba, I wonder if the procedure
can be realized via cell formulae...


Don't know if I understood you pseudocode correctly, but try this

=IF(AND(AND(A1:A6=1,D1:D6=value1),AND(B7:B25=value 2)),XX)

Note: This is an array formula that has to be confirmed with
CTRL+SHIFT+ENTER rather than just ENTER.

Replace value1, value2 and XX with the values you want to use.

The result of the formula is XX if all of A1:A6 ans D1:D6 have the
value1 at the same time as all of B7:B25 has the value2.
Other wise the result is FALSE.

Hope this helps. / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default A complex formula, help needed

Like Lars-Ã…ke, I'm not sure I under exactly what you want either, but here
is my attempt. Put this normally entered formula in your first cell (in Row
7 somewhere I'm guessing) and copy it down...

=IF(AND(COUNTIF(A$1:A$6,Value1)=COUNTIF(B$1:B$6,Va lue1),B7=Value2),"XX","")

Replace the two Value1 references with your actual first value and the
single Value2 reference with your second value (I've assumed "XX" is what
you wanted to display in the cell if the conditions are met).

--
Rick (MVP - Excel)


"Mac" wrote in message
...
Hello all,
please help me with a complex formula to assign to a cell; pseudocode for
it
goes like: for (i = 1 to 6 ; i++){ if (( Ai == value1) AND (Di == value1))
then (for( j = 7 to 25){ if (Bj == value2) then (write XX into this cell)}
)}; although it is an obvious candidate for vba, I wonder if the procedure
can be realized via cell formulae...


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
Formula or macro needed for sorting complex data issue. malycom Excel Discussion (Misc queries) 4 November 27th 08 07:24 AM
A rather difficult & complex statistical search formula needed Vasilis Tergen Excel Worksheet Functions 4 January 7th 07 07:31 PM
Help needed with Adapting complex INDEX formula sonar Excel Worksheet Functions 2 August 27th 05 01:40 PM
*URGENT* - Complex formula needed Stacy Excel Discussion (Misc queries) 1 July 1st 05 05:32 PM
Complex formula help needed Jan Excel Worksheet Functions 0 November 9th 04 03:19 PM


All times are GMT +1. The time now is 12:25 AM.

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

About Us

"It's about Microsoft Excel"