ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula (https://www.excelbanter.com/excel-discussion-misc-queries/42988-formula.html)

kiran

Formula
 
Dear All,

I want my out put to be as follows can any one help me on this
it should check the condition A,B,C & out put in D as follows
A B C
D
Change Request Status Change Type BO Approval
NR/Enh In Normal NA
NR/Enh Out Normal YES
NR/Enh In PI NA
NR/Enh Out PI NA
NR/Enh In EC NA
NR/Enh Out EC YES
Bug In Normal NA
Bug Out Normal NA
Takeover In Normal YES YES

TIA

Stefi

Hi Kiran,

This UDF gives the requested results, but watch out: it isn't clear wether
you gave all possible cases. The rules are not known, the results are given
by experience!

Public Function BOoutput(acol As String, bcol As String, ccol As String) As
String
If acol = "NR/Enh" Then
If bcol = "In" Then
BOoutput = "NA"
ElseIf ccol = "Normal" Or ccol = "EC" Then
BOoutput = "YES"
ElseIf ccol = "PI" Then
BOoutput = "NA"
Else
BOoutput = ""
End If
ElseIf acol = "Bug" Then
BOoutput = "NA"
ElseIf acol = "Takeover In" Then
BOoutput = "YES"
Else
BOoutput = ""
End If
End Function

Place it in a normal module, enter =BOoutput(A2,B2,C2) in cell D2 and fill
it down!

Regards,
Stefi

€˛kiran€¯ ezt Ć*rta:

Dear All,

I want my out put to be as follows can any one help me on this
it should check the condition A,B,C & out put in D as follows
A B C
D
Change Request Status Change Type BO Approval
NR/Enh In Normal NA
NR/Enh Out Normal YES
NR/Enh In PI NA
NR/Enh Out PI NA
NR/Enh In EC NA
NR/Enh Out EC YES
Bug In Normal NA
Bug Out Normal NA
Takeover In Normal YES YES

TIA


kiran

Dear Stefi,
Thanks for that can you help me how to run this program and use it

"Stefi" wrote:

Hi Kiran,

This UDF gives the requested results, but watch out: it isn't clear wether
you gave all possible cases. The rules are not known, the results are given
by experience!

Public Function BOoutput(acol As String, bcol As String, ccol As String) As
String
If acol = "NR/Enh" Then
If bcol = "In" Then
BOoutput = "NA"
ElseIf ccol = "Normal" Or ccol = "EC" Then
BOoutput = "YES"
ElseIf ccol = "PI" Then
BOoutput = "NA"
Else
BOoutput = ""
End If
ElseIf acol = "Bug" Then
BOoutput = "NA"
ElseIf acol = "Takeover In" Then
BOoutput = "YES"
Else
BOoutput = ""
End If
End Function

Place it in a normal module, enter =BOoutput(A2,B2,C2) in cell D2 and fill
it down!

Regards,
Stefi

€˛kiran€¯ ezt Ć*rta:

Dear All,

I want my out put to be as follows can any one help me on this
it should check the condition A,B,C & out put in D as follows
A B C
D
Change Request Status Change Type BO Approval
NR/Enh In Normal NA
NR/Enh Out Normal YES
NR/Enh In PI NA
NR/Enh Out PI NA
NR/Enh In EC NA
NR/Enh Out EC YES
Bug In Normal NA
Bug Out Normal NA
Takeover In Normal YES YES

TIA


Eric

Kiran,

If you tell us what the rules for BO Approval are, we could probably provide
a formula that would do it without using Visual Basic.

Eric


"kiran" wrote:

Dear All,

I want my out put to be as follows can any one help me on this
it should check the condition A,B,C & out put in D as follows
A B C
D
Change Request Status Change Type BO Approval
NR/Enh In Normal NA
NR/Enh Out Normal YES
NR/Enh In PI NA
NR/Enh Out PI NA
NR/Enh In EC NA
NR/Enh Out EC YES
Bug In Normal NA
Bug Out Normal NA
Takeover In Normal YES YES

TIA


Stefi

Hi Kiran,

First create a module: Tools-Macros-Visual Basic (or Alt-F11)
Right-click on VBAProject(your
filename)-Insert-Module
Paste here the code

In cell D2 enter: =BOoutput(A2,B2,C2)
Fill it down as necessary!

Nevertheless I agree with Eric, knowing the rules would be better!

Reegards,
Stefi



€˛kiran€¯ ezt Ć*rta:

Dear Stefi,
Thanks for that can you help me how to run this program and use it

"Stefi" wrote:

Hi Kiran,

This UDF gives the requested results, but watch out: it isn't clear wether
you gave all possible cases. The rules are not known, the results are given
by experience!

Public Function BOoutput(acol As String, bcol As String, ccol As String) As
String
If acol = "NR/Enh" Then
If bcol = "In" Then
BOoutput = "NA"
ElseIf ccol = "Normal" Or ccol = "EC" Then
BOoutput = "YES"
ElseIf ccol = "PI" Then
BOoutput = "NA"
Else
BOoutput = ""
End If
ElseIf acol = "Bug" Then
BOoutput = "NA"
ElseIf acol = "Takeover In" Then
BOoutput = "YES"
Else
BOoutput = ""
End If
End Function

Place it in a normal module, enter =BOoutput(A2,B2,C2) in cell D2 and fill
it down!

Regards,
Stefi

€˛kiran€¯ ezt Ć*rta:

Dear All,

I want my out put to be as follows can any one help me on this
it should check the condition A,B,C & out put in D as follows
A B C
D
Change Request Status Change Type BO Approval
NR/Enh In Normal NA
NR/Enh Out Normal YES
NR/Enh In PI NA
NR/Enh Out PI NA
NR/Enh In EC NA
NR/Enh Out EC YES
Bug In Normal NA
Bug Out Normal NA
Takeover In Normal YES YES

TIA


kiran

Thanks Thanks a lot Stefi ...

"Stefi" wrote:

Hi Kiran,

First create a module: Tools-Macros-Visual Basic (or Alt-F11)
Right-click on VBAProject(your
filename)-Insert-Module
Paste here the code

In cell D2 enter: =BOoutput(A2,B2,C2)
Fill it down as necessary!

Nevertheless I agree with Eric, knowing the rules would be better!

Reegards,
Stefi



€˛kiran€¯ ezt Ć*rta:

Dear Stefi,
Thanks for that can you help me how to run this program and use it

"Stefi" wrote:

Hi Kiran,

This UDF gives the requested results, but watch out: it isn't clear wether
you gave all possible cases. The rules are not known, the results are given
by experience!

Public Function BOoutput(acol As String, bcol As String, ccol As String) As
String
If acol = "NR/Enh" Then
If bcol = "In" Then
BOoutput = "NA"
ElseIf ccol = "Normal" Or ccol = "EC" Then
BOoutput = "YES"
ElseIf ccol = "PI" Then
BOoutput = "NA"
Else
BOoutput = ""
End If
ElseIf acol = "Bug" Then
BOoutput = "NA"
ElseIf acol = "Takeover In" Then
BOoutput = "YES"
Else
BOoutput = ""
End If
End Function

Place it in a normal module, enter =BOoutput(A2,B2,C2) in cell D2 and fill
it down!

Regards,
Stefi

€˛kiran€¯ ezt Ć*rta:

Dear All,

I want my out put to be as follows can any one help me on this
it should check the condition A,B,C & out put in D as follows
A B C
D
Change Request Status Change Type BO Approval
NR/Enh In Normal NA
NR/Enh Out Normal YES
NR/Enh In PI NA
NR/Enh Out PI NA
NR/Enh In EC NA
NR/Enh Out EC YES
Bug In Normal NA
Bug Out Normal NA
Takeover In Normal YES YES

TIA



All times are GMT +1. The time now is 05:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com