return ‘x’ if any of the cell within a range has any value in it

ad3l3n3

New Member
Joined
Apr 19, 2010
Messages
37
i have a range A1:G1

randomly, it is marked with ‘x’

i want to put a formula in O1 that as long as any cell within A1:F1 contain ‘X’, it will return me ‘X’

and if there’s not ‘X’ at all, it will leave O1 as blank
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
How about this?

Code:
=IF(COUNTIF($A$1:$F$1,"x")>0,"x","")
 
Last edited:
Upvote 0
thanks. it works perfectly. can i also know the formula if i want it another way round.

if cell O1 contains ‘x’, then all cell within A1:G1 to mark ‘x’
 
Upvote 0
In A1 & fill across
=IF($O$1="x","x","")
 
Upvote 0

Forum statistics

Threads
1,196,428
Messages
6,015,191
Members
441,882
Latest member
rcgyuk

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