Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Please, need help, I have to prepare a report today.

I need a formula that combines data from 2 or more
cells from column "A", when cells from columns "F and/or G"
MATCH data in cells from column "H", and only IF column "B" is =1.
Example "I1, I2, I3, etc"

A B C D E F G H I
WSt USA Ch Srv Ob LHD TD TL USA
1 100 1 30 24 24 100, 103
2 101 1 33 30 100, 102, 105
3 102 1 30 33 101, 103
4 103 1 33 24 50 105
5 104 1 84 85 74
6 105 1 30 50 84
7 106 1 33 24 85

Just human
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Please, need help, I have to prepare a report today.

Here's one formulas model which delivers the exact results indicated

Source table as posted is assumed in A1:H8, data in row2 down
In I2:
=IF(AND(OR(INDEX($F$2:$F$8,COLUMNS($A:A))=$H2,INDE X($G$2:$G$8,COLUMNS($A:A))=$H2),INDEX($B$2:$B$8,CO LUMNS($A:A))=1),COLUMNS($A:A),"")
Copy I2 across to O2, fill down to O8. This is the criteria matrix, as per
your specs.
[Copy across by as many cols as there are source data rows]

In P2:
=IF(COLUMNS($A:A)COUNT($I2:$O2),"",INDEX($A$2:$A$ 8,SMALL($I2:$O2,COLUMNS($A:A))))
Copy P2 across to V2, fill down to V8. This part returns the multiple
results, neatly packed to the left in each row, with each result in its own
cell. To me, this sort of results format would normally suffice/is better?

To concat the multiple results per row as desired (ie with a comma-space)
Put in W2:
=SUBSTITUTE(TRIM(P2&" "&Q2&" "&R2&" "&S2&" "&T2&" "&U2&" "&V2)," ",", ")
Copy down to W8, to return exact results indicated

Since the above should've helped, press the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"JMALTO" wrote:
I need a formula that combines data from 2 or more
cells from column "A", when cells from columns "F and/or G"
MATCH data in cells from column "H", and only IF column "B" is =1.
Example "I1, I2, I3, etc"

A B C D E F G H I
WSt USA Ch Srv Ob LHD TD TL USA
1 100 1 30 24 24 100, 103
2 101 1 33 30 100, 102, 105
3 102 1 30 33 101, 103
4 103 1 33 24 50 105
5 104 1 84 85 74
6 105 1 30 50 84
7 106 1 33 24 85

Just human

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Please, need help, I have to prepare a report today.

Max, thanks. That was wonderfull.
Having so limited space to include in this forum and falling into the
assumption that there will be only one whole formula that will handle all the
conditions; I did resize the amount of data for the purpose of explaining
what I need, in reality there are 300+ rows, and beside column "I"; there are
3 more that must be filled up when the columns "C, D and E" =1.

Is it possible to use the "StrinConcat" function to do all this within one
formula?

This is what I have so far with this function but I haven't add succesfully
the "IF" column B=1 into it yet.
=StringConcat(",
",IF($F$7:$F$343=H7,$A$7:$A$343,""),IF($G$7:$G$343 =H7,$A$7:$A$343,""))

Just human

"Max" wrote:

Here's one formulas model which delivers the exact results indicated

Source table as posted is assumed in A1:H8, data in row2 down
In I2:
=IF(AND(OR(INDEX($F$2:$F$8,COLUMNS($A:A))=$H2,INDE X($G$2:$G$8,COLUMNS($A:A))=$H2),INDEX($B$2:$B$8,CO LUMNS($A:A))=1),COLUMNS($A:A),"")
Copy I2 across to O2, fill down to O8. This is the criteria matrix, as per
your specs.
[Copy across by as many cols as there are source data rows]

In P2:
=IF(COLUMNS($A:A)COUNT($I2:$O2),"",INDEX($A$2:$A$ 8,SMALL($I2:$O2,COLUMNS($A:A))))
Copy P2 across to V2, fill down to V8. This part returns the multiple
results, neatly packed to the left in each row, with each result in its own
cell. To me, this sort of results format would normally suffice/is better?

To concat the multiple results per row as desired (ie with a comma-space)
Put in W2:
=SUBSTITUTE(TRIM(P2&" "&Q2&" "&R2&" "&S2&" "&T2&" "&U2&" "&V2)," ",", ")
Copy down to W8, to return exact results indicated

Since the above should've helped, press the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"JMALTO" wrote:
I need a formula that combines data from 2 or more
cells from column "A", when cells from columns "F and/or G"
MATCH data in cells from column "H", and only IF column "B" is =1.
Example "I1, I2, I3, etc"

A B C D E F G H I
WSt USA Ch Srv Ob LHD TD TL USA
1 100 1 30 24 24 100, 103
2 101 1 33 30 100, 102, 105
3 102 1 30 33 101, 103
4 103 1 33 24 50 105
5 104 1 84 85 74
6 105 1 30 50 84
7 106 1 33 24 85

Just human

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Please, need help, I have to prepare a report today.

I'm not sure there's a single cell formula that can handle all of the complex
logics that you seek to do. If there is, you would have received responses to
that effect by now to your many repeat postings. Maybe just stick to your
macro which you say is doing the job for you right now? (in one of your
earlier posts)

Kindly press the YES button in my earlier response
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"JMALTO" wrote:
Max, thanks. That was wonderfull.
Having so limited space to include in this forum and falling into the
assumption that there will be only one whole formula that will handle all the
conditions; I did resize the amount of data for the purpose of explaining
what I need, in reality there are 300+ rows, and beside column "I"; there are
3 more that must be filled up when the columns "C, D and E" =1.

Is it possible to use the "StrinConcat" function to do all this within one
formula?

This is what I have so far with this function but I haven't add succesfully
the "IF" column B=1 into it yet.
=StringConcat(",
",IF($F$7:$F$343=H7,$A$7:$A$343,""),IF($G$7:$G$343 =H7,$A$7:$A$343,""))


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
How do I prepare a report rsgyani Excel Discussion (Misc queries) 1 April 17th 08 10:02 PM
how to prepare formulae Rama Excel Worksheet Functions 2 March 2nd 07 11:50 AM
How do I prepare a allowance payment tracker? Daoud Fakhry Excel Discussion (Misc queries) 2 October 10th 06 06:08 AM
HOW TO PREPARE SUMMARY OF DIFFERENT ITEMS IN ANOTHER WORKSHEET? Viswanathan Balaji Excel Worksheet Functions 0 April 24th 06 12:03 PM
=IF(OR(TODAY()G9),"Pass","Overdue") Why doe it not wo. Fkor Excel Discussion (Misc queries) 3 March 10th 05 08:29 AM


All times are GMT +1. The time now is 02:37 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"