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 I need to add an IF condition to a formula

I am using a very good function called "StringConcat" where I'm comparing
cells on columns F and G, and when any cell in column H match it, then I
collect data from that very same row in column A. Example: Because data that
match in columns G1, G4 with the data on column H, then I pull data from the
corresponding rows in column A. I1=A1 and A4. Notice that also A7 match cell
H1, but I don't want it because cell B7 is not equal to 1.
So, that is what I want to add to the formula a condition that IF cells in
column B=1 then I want the corresponding data on cells in column A.
This is what I have so far.

=StringConcat(",
",IF($F$1:$F$7=H1,$A$1:$A$7,""),IF($G$1:$G$7=H1,$A $1:$A$7,""))


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

When it commes to machinning, I am the BEST
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 211
Default I need to add an IF condition to a formula

Is "StringConcat" function a user defined function (UDF)?
Could you please post the code for this UDF?

--
R. Khoshravan
Please click "Yes" if it is helpful.


"JMALTO" wrote:

I am using a very good function called "StringConcat" where I'm comparing
cells on columns F and G, and when any cell in column H match it, then I
collect data from that very same row in column A. Example: Because data that
match in columns G1, G4 with the data on column H, then I pull data from the
corresponding rows in column A. I1=A1 and A4. Notice that also A7 match cell
H1, but I don't want it because cell B7 is not equal to 1.
So, that is what I want to add to the formula a condition that IF cells in
column B=1 then I want the corresponding data on cells in column A.
This is what I have so far.

=StringConcat(",
",IF($F$1:$F$7=H1,$A$1:$A$7,""),IF($G$1:$G$7=H1,$A $1:$A$7,""))


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

When it commes to machinning, I am the BEST

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 222
Default I need to add an IF condition to a formula

Try this version:

=StringConcat(",",IF($F$1:$F$7=G1,IF($B$1:$B$7=1,$ A$1:$A$7,""),""))

Ctrl-Shift-Enter to confirm the array.

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"JMALTO" wrote:

I am using a very good function called "StringConcat" where I'm comparing
cells on columns F and G, and when any cell in column H match it, then I
collect data from that very same row in column A. Example: Because data that
match in columns G1, G4 with the data on column H, then I pull data from the
corresponding rows in column A. I1=A1 and A4. Notice that also A7 match cell
H1, but I don't want it because cell B7 is not equal to 1.
So, that is what I want to add to the formula a condition that IF cells in
column B=1 then I want the corresponding data on cells in column A.
This is what I have so far.

=StringConcat(",
",IF($F$1:$F$7=H1,$A$1:$A$7,""),IF($G$1:$G$7=H1,$A $1:$A$7,""))


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

When it commes to machinning, I am the BEST

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default I need to add an IF condition to a formula

Maybe it's the one from Chip Pearson's site, available he

http://www.cpearson.com/excel/stringconcatenation.aspx

Hope this helps.

Pete

On Feb 5, 6:51*am, Khoshravan
wrote:
Is "StringConcat" function a user defined function (UDF)?
Could you please post the code for this UDF?

--
R. Khoshravan
Please click "Yes" if it is helpful.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default I need to add an IF condition to a formula

That is correct ,Pete_UK. They offer a very simple example in their web page

--
When it commes to machinning, I am the BEST


"Pete_UK" wrote:

Maybe it's the one from Chip Pearson's site, available he

http://www.cpearson.com/excel/stringconcatenation.aspx

Hope this helps.

Pete

On Feb 5, 6:51 am, Khoshravan
wrote:
Is "StringConcat" function a user defined function (UDF)?
Could you please post the code for this UDF?

--
R. Khoshravan
Please click "Yes" if it is helpful.





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default I need to add an IF condition to a formula


Awsome, "JBeaucaire", you were so close. With a minor modification I got it
to work. -------Thanks man-------.
This is the final formula

=StringConcat(",
",IF($F$7:$F$343=$H7,IF(B$7:B$343=1,$A$7:$A$343,"" ),""),IF($G$7:$G$343=$H7,IF(B$7:B$343=1,$A$7:$A$34 3,""),""))
--
When it commes to machinning, I am the BEST


"JBeaucaire" wrote:

Try this version:

=StringConcat(",",IF($F$1:$F$7=G1,IF($B$1:$B$7=1,$ A$1:$A$7,""),""))

Ctrl-Shift-Enter to confirm the array.

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"JMALTO" wrote:

I am using a very good function called "StringConcat" where I'm comparing
cells on columns F and G, and when any cell in column H match it, then I
collect data from that very same row in column A. Example: Because data that
match in columns G1, G4 with the data on column H, then I pull data from the
corresponding rows in column A. I1=A1 and A4. Notice that also A7 match cell
H1, but I don't want it because cell B7 is not equal to 1.
So, that is what I want to add to the formula a condition that IF cells in
column B=1 then I want the corresponding data on cells in column A.
This is what I have so far.

=StringConcat(",
",IF($F$1:$F$7=H1,$A$1:$A$7,""),IF($G$1:$G$7=H1,$A $1:$A$7,""))


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

When it commes to machinning, I am the BEST

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default I need to add an IF condition to a formula

"JBeaucaire"
What if the data on cells A B F and G are in Sheet2?
It seems like doesn't want to pull data from different sheets

Thanks,

--
When it commes to machinning, I am the BEST


"JBeaucaire" wrote:

Try this version:

=StringConcat(",",IF($F$1:$F$7=G1,IF($B$1:$B$7=1,$ A$1:$A$7,""),""))

Ctrl-Shift-Enter to confirm the array.

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"JMALTO" wrote:

I am using a very good function called "StringConcat" where I'm comparing
cells on columns F and G, and when any cell in column H match it, then I
collect data from that very same row in column A. Example: Because data that
match in columns G1, G4 with the data on column H, then I pull data from the
corresponding rows in column A. I1=A1 and A4. Notice that also A7 match cell
H1, but I don't want it because cell B7 is not equal to 1.
So, that is what I want to add to the formula a condition that IF cells in
column B=1 then I want the corresponding data on cells in column A.
This is what I have so far.

=StringConcat(",
",IF($F$1:$F$7=H1,$A$1:$A$7,""),IF($G$1:$G$7=H1,$A $1:$A$7,""))


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

When it commes to machinning, I am the BEST

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default I need to add an IF condition to a formula

"JBeaucaire"
What if the data on cells A B F and G are in Sheet2?
It seems like doesn't want to pull data from different sheets

--
When it commes to machinning, I am the BEST


"JBeaucaire" wrote:

Try this version:

=StringConcat(",",IF($F$1:$F$7=G1,IF($B$1:$B$7=1,$ A$1:$A$7,""),""))

Ctrl-Shift-Enter to confirm the array.

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"JMALTO" wrote:

I am using a very good function called "StringConcat" where I'm comparing
cells on columns F and G, and when any cell in column H match it, then I
collect data from that very same row in column A. Example: Because data that
match in columns G1, G4 with the data on column H, then I pull data from the
corresponding rows in column A. I1=A1 and A4. Notice that also A7 match cell
H1, but I don't want it because cell B7 is not equal to 1.
So, that is what I want to add to the formula a condition that IF cells in
column B=1 then I want the corresponding data on cells in column A.
This is what I have so far.

=StringConcat(",
",IF($F$1:$F$7=H1,$A$1:$A$7,""),IF($G$1:$G$7=H1,$A $1:$A$7,""))


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

When it commes to machinning, I am the BEST

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default I need to add an IF condition to a formula

"JBeaucaire"
What if the data on cells A B F and G are in Sheet2?
It seems like doesn't want to pull data from different sheets

--
When it commes to machinning, I am the BEST


"JBeaucaire" wrote:

Try this version:

=StringConcat(",",IF($F$1:$F$7=G1,IF($B$1:$B$7=1,$ A$1:$A$7,""),""))

Ctrl-Shift-Enter to confirm the array.

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"JMALTO" wrote:

I am using a very good function called "StringConcat" where I'm comparing
cells on columns F and G, and when any cell in column H match it, then I
collect data from that very same row in column A. Example: Because data that
match in columns G1, G4 with the data on column H, then I pull data from the
corresponding rows in column A. I1=A1 and A4. Notice that also A7 match cell
H1, but I don't want it because cell B7 is not equal to 1.
So, that is what I want to add to the formula a condition that IF cells in
column B=1 then I want the corresponding data on cells in column A.
This is what I have so far.

=StringConcat(",
",IF($F$1:$F$7=H1,$A$1:$A$7,""),IF($G$1:$G$7=H1,$A $1:$A$7,""))


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

When it commes to machinning, I am the BEST

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default I need to add an IF condition to a formula

"JBeaucaire"
What if the data on cells A B F and G are in Sheet2?
It seems like doesn't want to pull data from different sheets

--
When it commes to machinning, I am the BEST


"JBeaucaire" wrote:

Try this version:

=StringConcat(",",IF($F$1:$F$7=G1,IF($B$1:$B$7=1,$ A$1:$A$7,""),""))

Ctrl-Shift-Enter to confirm the array.

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"JMALTO" wrote:

I am using a very good function called "StringConcat" where I'm comparing
cells on columns F and G, and when any cell in column H match it, then I
collect data from that very same row in column A. Example: Because data that
match in columns G1, G4 with the data on column H, then I pull data from the
corresponding rows in column A. I1=A1 and A4. Notice that also A7 match cell
H1, but I don't want it because cell B7 is not equal to 1.
So, that is what I want to add to the formula a condition that IF cells in
column B=1 then I want the corresponding data on cells in column A.
This is what I have so far.

=StringConcat(",
",IF($F$1:$F$7=H1,$A$1:$A$7,""),IF($G$1:$G$7=H1,$A $1:$A$7,""))


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

When it commes to machinning, I am the BEST

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
Please Help Again-Condition Formula Kareinia Excel Worksheet Functions 5 March 6th 08 08:06 PM
Condition Formula Kareinia Excel Worksheet Functions 4 March 6th 08 04:17 PM
Add Condition to Formula Karen Smith Excel Discussion (Misc queries) 2 December 21st 07 07:18 PM
MORE THAN ONE CONDITION IN A FORMULA CLM Excel Worksheet Functions 5 January 18th 07 01:21 PM
Add condition to formula Pat Excel Worksheet Functions 0 November 16th 04 12:23 PM


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