Range in a row to return a value

vazdajic

New Member
Joined
Dec 15, 2017
Messages
5
Hello there.

I have 3 columns (A, B, C) based on which column D will have a result filled in (RETURNED VALUE):

Columns look like this:
A B C D (returned value)
OK OK OK OK
OK NO OK NO
OK OK OK
NO NO

OK OK NO NO

Cells in columns A, B and C are text values. Only possible ones are "OK" and "NO" where "NO" beats "OK". Cells may be empty, in such a case, returned value in column D is also empty.

How this can be done in a formula?

Thanks
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Sorry everyone.. My Columns here in original thread look confusing as this forum site deleted my SPACES and I cannot upload a local picture of what I want (only web link is allowed).

A______B______C______D
OK____OK_____OK_____OK
OK____NO_____OK_____NO
_______________________
OK____OK_________
___OK
NO__________________NO
 
Upvote 0
Hi & welcome to the board
How about
=IF(COUNTA(A2:C2)=0,"",IF(COUNTIF(A2:C2,"no")>0,"NO","OK"))
 
Upvote 0
Hi there.. Thanks for the Welcome.

I am unable to make this work.. Can you check the syntax of what you have suggested?

Thanks

Hi & welcome to the board
How about
=IF(COUNTA(A2:C2)=0,"",IF(COUNTIF(A2:C2,"no")>0,"NO","OK"))
 
Upvote 0
That formula needs to go in D2 & drag down, if you want to start in row 1 change all the 2 into 1
 
Upvote 0
With the layout you've shown in post#2

Excel 2013 32 bit
ABCD
1Header 1Header 2Header 3Header 4
2okokokOK
3oknookNO
4
5okokOK
6noNO
7nookNO
8
9okoknoNO
Sheet2
Cell Formulas
RangeFormula
D2=IF(COUNTA(A2:C2)=0,"",IF(COUNTIF(A2:C2,"no")>0,"NO","OK"))
 
Upvote 0
Ah.. I'm gonna go crzy.. maybe it's my Excel giving me issues (Office 2010 x86, Win7 64)

With the layout you've shown in post#2
Excel 2013 32 bit
ABCD
1Header 1Header 2Header 3Header 4
2okokokOK
3oknookNO
4
5okokOK
6noNO
7nookNO
8
9okoknoNO

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2

Worksheet Formulas
CellFormula
D2=IF([COLOR=rgb(255]COUNTA(A2:C2)=0,"",IF(COUNTIF([COLOR=0)]A2:C2,"no"[/COLOR])>0,"NO","OK")[/COLOR])

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
What results are you getting?
 
Upvote 0

Forum statistics

Threads
1,215,461
Messages
6,124,952
Members
449,198
Latest member
MhammadishaqKhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top