• Status: Solved
• Priority: Medium
• Security: Public
• Views: 200

# How would I fill an xlsx column according to the body of this post?

I have a large excel spreadsheet with a column I that contains  three different entrees -
S-1_labs, PRN and Li_labs.   In column J  would like  57 when column I = S-1_Labs, 86 when column I = PRN  and 60 when column I = Li_labs. What equation can I use to avoid entering these numbers into column I manually?
Thanks
0
PDSWSS
• 6
• 4
2 Solutions

Finance AnalystCommented:
Couple of options, as its only 3 values the simplest would be a nested IF statement.

In column J, assume starting row 2, the following formula:

=IF(I2="S-1_labs",57,IF(I2="PRN",86,60))

For a larger set of variables I would create a lookup table.

Thanks
Rob H
0

Author Commented:
I should have mentioned that there are also blank cells where neither of the three values
are entered.  Your equation will enter "FALSE" in these fields.
Would you be able to send me an equation that will address this 4th possibility?
Thanks
0

Author Commented:
Second equation to delete all False cells?
0

Finance AnalystCommented:
=IF(I2="S-1_labs",57,IF(I2="PRN",86,IF(I2="Li_Labs",60))
0

Finance AnalystCommented:
Apply autofilter to data and select "FALSE" in column J.

Deleting rows will only delete those visible.

Thanks
Rob H
0

Author Commented:
Filtering in this situation not optimal.
Would be better to use an equation,  where  cell = false in column J then delete "False"
0

Author Commented:
Thank you very much for the solution.  FYI should be   )))   at the end not  ))
0

Author Commented:
Thanks again.
0

Finance AnalystCommented:
Formula can't be used to generate delete but could change to blank rather than false. Put ,"" before closing brackets.
0

Author Commented:
Thanks again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.