Countif Else?

burmtra

New Member
Joined
Aug 10, 2017
Messages
2
Hi, I have a column of values which are either R, A or G.

I want to search the column(range) and if any cells contain R to return R, otherwise if any cells return A to return a A otherwise to return G.

I want this is one formulae which I can place in a cell.

Any assistance would be greatly appreciated.

Thanks!
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi, I have a column of values which are either R, A or G.

I want to search the column(range) and if any cells contain R to return R, otherwise if any cells return A to return a A otherwise to return G.

I want this is one formulae which I can place in a cell.

Any assistance would be greatly appreciated.

Thanks!

post a sample of the data and the required output..
 
Upvote 0
post a sample of the data and the required output..

Hi, here is the range (a column of data)





4/08/2017
R
RAM on 02,09,14,18a,20a,22a,22a,25a,27a, Diskpace on 22a




A
EBMFILE02 Memory




A
Memory on EBMMAIL01 and EBMMAIL02




A
Memory on both EBMQSL01 & EBMSQL02




G






G














G



I want to search through all of these cells and if any of the cells = R to produce an "R" in the output cell; otherwise if any are an A to produce an "A"; otherwise to return a "G".

Thanks
 
Upvote 0
not sure if I understood the request correctly but if you want to check if the cell contains R, A or G, here's the formula:

=IF(ISNUMBER(FIND("R",A1)),"R",IF(ISNUMBER(FIND("A",A1)),"A",IF(ISNUMBER(FIND("G",A1)),"G","")))
 
Last edited:
Upvote 0
I want to search the column(range) and if any cells contain R to return R, otherwise if any cells return A to return a A otherwise to return G.

Hi, welcome to the board! Not sure I understand the data either, but based on the above maybe:

=IF(COUNTIF(A:A,"R"),"R",IF(COUNTIF(A:A,"A"),"A","G"))
 
Upvote 0

Forum statistics

Threads
1,226,117
Messages
6,189,061
Members
453,524
Latest member
AshJames

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