Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
In the following example column E thru K, are labelled Machine1 thru
Machine6 respectively, in only 1 of the columns I mark with an "X", this lets me know that the information I enter in other columns on the same row are linked to that specific machine For example, I place an "X" in E3, all the data in columns L,M,N,O,P......... and so on belong to Machine1. If I were to place an "X" in F4 then the data belongs to Machine2. In column E thru K only one "X" exists on each row Now I'm trying to look at columns E thru K and if an "X" exists on that row then place the text, Machine1, Machine2 etc. etc. in a cell in column B. The if statement below, does not seem to work correctly, when the formula is copied down several rows, the Machine # does not change to reflect what is in column E thru K. The one good thing is it has no more than 7 nested if's. Any suggestions or easier ways of doing this. =IF(E3="X","Machine1",IF(F3="X","Machine2",IF(G3=" X","Machine3",IF(H3="X","Machine4",IF(I3="X","Mach ine5,IF(J3="X",Machine6",IF(K3="X","Machine7","No Machine"))))))) |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Here's one way:
=IF(COUNTIF(E3:K3,"x"),"Machine"&MATCH("x",E3:K3,0 ),"") Biff "burl_h" wrote in message ups.com... In the following example column E thru K, are labelled Machine1 thru Machine6 respectively, in only 1 of the columns I mark with an "X", this lets me know that the information I enter in other columns on the same row are linked to that specific machine For example, I place an "X" in E3, all the data in columns L,M,N,O,P......... and so on belong to Machine1. If I were to place an "X" in F4 then the data belongs to Machine2. In column E thru K only one "X" exists on each row Now I'm trying to look at columns E thru K and if an "X" exists on that row then place the text, Machine1, Machine2 etc. etc. in a cell in column B. The if statement below, does not seem to work correctly, when the formula is copied down several rows, the Machine # does not change to reflect what is in column E thru K. The one good thing is it has no more than 7 nested if's. Any suggestions or easier ways of doing this. =IF(E3="X","Machine1",IF(F3="X","Machine2",IF(G3=" X","Machine3",IF(H3="X","Machine4",IF(I3="X","Mach ine5,IF(J3="X",Machine6",IF(K3="X","Machine7","No Machine"))))))) |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Biff,
Thanks for the help, your solution worked great burl T. Valko wrote: Here's one way: =IF(COUNTIF(E3:K3,"x"),"Machine"&MATCH("x",E3:K3,0 ),"") Biff "burl_h" wrote in message ups.com... In the following example column E thru K, are labelled Machine1 thru Machine6 respectively, in only 1 of the columns I mark with an "X", this lets me know that the information I enter in other columns on the same row are linked to that specific machine For example, I place an "X" in E3, all the data in columns L,M,N,O,P......... and so on belong to Machine1. If I were to place an "X" in F4 then the data belongs to Machine2. In column E thru K only one "X" exists on each row Now I'm trying to look at columns E thru K and if an "X" exists on that row then place the text, Machine1, Machine2 etc. etc. in a cell in column B. The if statement below, does not seem to work correctly, when the formula is copied down several rows, the Machine # does not change to reflect what is in column E thru K. The one good thing is it has no more than 7 nested if's. Any suggestions or easier ways of doing this. =IF(E3="X","Machine1",IF(F3="X","Machine2",IF(G3=" X","Machine3",IF(H3="X","Machine4",IF(I3="X","Mach ine5,IF(J3="X",Machine6",IF(K3="X","Machine7","No Machine"))))))) |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You're welcome. Thanks for the feedback!
Biff "burl_h" wrote in message oups.com... Biff, Thanks for the help, your solution worked great burl T. Valko wrote: Here's one way: =IF(COUNTIF(E3:K3,"x"),"Machine"&MATCH("x",E3:K3,0 ),"") Biff "burl_h" wrote in message ups.com... In the following example column E thru K, are labelled Machine1 thru Machine6 respectively, in only 1 of the columns I mark with an "X", this lets me know that the information I enter in other columns on the same row are linked to that specific machine For example, I place an "X" in E3, all the data in columns L,M,N,O,P......... and so on belong to Machine1. If I were to place an "X" in F4 then the data belongs to Machine2. In column E thru K only one "X" exists on each row Now I'm trying to look at columns E thru K and if an "X" exists on that row then place the text, Machine1, Machine2 etc. etc. in a cell in column B. The if statement below, does not seem to work correctly, when the formula is copied down several rows, the Machine # does not change to reflect what is in column E thru K. The one good thing is it has no more than 7 nested if's. Any suggestions or easier ways of doing this. =IF(E3="X","Machine1",IF(F3="X","Machine2",IF(G3=" X","Machine3",IF(H3="X","Machine4",IF(I3="X","Mach ine5,IF(J3="X",Machine6",IF(K3="X","Machine7","No Machine"))))))) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Nested "IF" Statement | Excel Worksheet Functions | |||
Nested IF statement with VLOOKUP | Excel Discussion (Misc queries) | |||
:confused: Nested if then else statement | Excel Worksheet Functions | |||
Nested IF Statement Question | Excel Discussion (Misc queries) | |||
7+ nested if statement? | Excel Worksheet Functions |