# If cell = certain number, output new value in next column

1. ## If cell = certain number, output new value in next column

Ok so Basically I am creating a scorecard and I am looking for a formula that will look at the value of a cell in Column D and if that value in Column D = a certain number then I want it to give a new number in Column E as a result. So if D4 = 0 then I want E4 to = 28; If D4 = 1 or 2 I want E4 to = 14, and if D4 = anything greater than 2 I want E4 to = 0.

Is this possible? How can I do this?

2. ## Re: If cell = certain number, output new value in next column

Yes, and probably best done with a lookup table. Exactly how will require a sample workbook showing us your layout.

3. ## Re: If cell = certain number, output new value in next column

You can use this formula

=IF(D4=0,24,IF(D4=1,14,IF(D4=2,14,"")))

Deleted

5. ## Re: If cell = certain number, output new value in next column

That worked great! Thanks. I was using something similar but missed a few.

Would this work similar if I wanted to do a range in the formula. For example IF D4 is between 0-3 then E4 = 10?

6. ## Re: If cell = certain number, output new value in next column

As I said, it would bee better with a lookup table, as it will be easier to maintain and update going forward.

7. ## Re: If cell = certain number, output new value in next column

Originally Posted by supersoccrsqueak
That worked great! Thanks. I was using something similar but missed a few.

Would this work similar if I wanted to do a range in the formula. For example IF D4 is between 0-3 then E4 = 10?
Something like this
IF(AND(D4>=0,D4<=3),10,"something else")

But an empty cell is considered to be equal to zero in numerical comparisons, so the above formula will return 10 also for D4 being empty. If you want to exclude empty cells, try
=IF(AND(NOT(ISBLANK(D4)),D4>=0,D4<=3),10,"something else")

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1