Find value in any of 3 different columns and return value of

brendakc

New Member
Joined
Sep 1, 2002
Messages
5
I need a formula to to look a 3 different columns and if any contain the number 6, return the value of a different cell. For example:

If F4 or G4 or H4 contain the number 6, return the content in A4.

Thanks!
This message was edited by brendakc on 2002-09-02 19:40
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

PaddyD

MrExcel MVP
Joined
May 1, 2002
Messages
14,234
welcome to the board!

try this -

=IF(OR(F4:H4=6),A4,"No 6")

which needs to be array entered (i.e. with control + shift + enter, not just enter. If done right, excel will add curly brackets round the formula).

It's just shorthand for:

=IF(OR(F4=6,G4=6,H4=6),A4,"No 6")


paddy
 

brendakc

New Member
Joined
Sep 1, 2002
Messages
5
Gee! That was fast! And it is exactly what I needed, except that I forgot one thing.

Using the same conditions, return the content of A4 only if R4>0

Thanks!
 

PaddyD

MrExcel MVP
Joined
May 1, 2002
Messages
14,234
On 2002-09-02 20:04, brendakc wrote:
Gee! That was fast! And it is exactly what I needed, except that I forgot one thing.

Using the same conditions, return the content of A4 only if R4>0

Thanks!

how about:

=IF(and((OR(F4=6,G4=6,H4=6)),R4>0),A4,"No 6")
 

Forum statistics

Threads
1,144,056
Messages
5,722,256
Members
422,419
Latest member
Havok390

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
Top