You are viewing limited content. For full access, please sign in.

Question

Question

"If" Formula Help

asked on November 9, 2021

Hello,

I'm have troubles with the "If" formula and am hoping someone can help me out. I have a table of three static rows. I want to have another field outside of that table populate with the data from the one of the fields in the table. For example, in my table below, I want to have the single line field populate with the data in column 1 if column 2 is yes.  Note: only one row will have column 2 be selected as yes.

I basically want the formula to say "If row 1 column 2 is yes, then populate the single line field with the field value in row 1 column 1, OR if row 2 column 2 is yes, then populate the single line field with the field value in row 2 column 1, OR if row 3 column 2 is yes, populate the single line field with the field value in row 3 column 1. Is there any easy way to do this?

0 0

Answer

SELECTED ANSWER
replied on November 9, 2021

I used your Table fields from your example above

=IF(INDEX(Table.Column_2,1)="Yes",INDEX(Table.Column_1,1),IF(INDEX(Table.Column_2,2)="Yes",INDEX(Table.Column_1,2),IF(INDEX(Table.Column_2,3)="Yes",INDEX(Table.Column_1,3)," ")))

1 0
replied on November 10, 2021

Thank you! This worked!

0 0

Replies

replied on November 9, 2021 Show version history

Another option to go at this is to add another field to your table (you can hide this with a rule)

In this Pick field you would have the formula

=IF(INDEX(Table.Column_2,ROW())="Yes",ROW(),0)

FYI, the Pick Field would need to be a number field

Then in your Selected output field below you put this formula which will pick the value of the field Row where you choose Yes. In the case of more than 1 row being selected it will return the value of the last row selected.

=IF(MAX(Table.Pick_1)=0," ",INDEX(Table.Column_1,MAX(Table.Pick_1)))

3 0
You are not allowed to follow up in this post.

Sign in to reply to this post.