function help

mort1703

Active Member
Joined
Sep 13, 2008
Messages
266
Hi

I am using the following function:

=IF(COUNTIF(A:A,B2)>0,"B","A")

Now this function allows me to search column A for matches in column B.

column a column b column c column d column e column f column g
alpha =IF(COUNTIF(A:A,B2)>0,"B","A") value = A 1 13 0 0
bravo alpha =IF(COUNTIF(A:A,B3)>0,"B","A") value = B 2 5 1 13
charlie =IF(COUNTIF(A:A,B4)>0,"B","A") value = A 1 8 0 0
delta alpha =IF(COUNTIF(A:A,B5)>0,"B","A") value = B 5 15 0 0

I need to expand the above formula to compare the values in columns b, f & g with columns a, d & e and give a value of A, B or C in column C

so if take the bravo row, it wants to know if cell b3,f3 and g3 matches the information in a2, d2 and e2, if, it matches exactly c3 should equal C, if b3 and a2 match a value of B else a value of A
so in this case I would expect c2 = A, c3 = B, c4 = A, c5 = B

not sure this can be done but would appreciate any help
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
COLUMN ACOLUMN BCOLUMN CCOLUMN DCOLUMN ECOLUMN FCOLUMN G
ALPHA=IF(COUNTIF(A:A,B2)>0,"B","A")11300
BRAVOALPHA=IF(COUNTIF(A:A,B3)>0,"B","A")25113
CHARLIE=IF(COUNTIF(A:A,B4)>0,"B","A")1800
DELTAALPHA=IF(COUNTIF(A:A,B5)>0,"B","A")51500

sorry had a look at my previous post and realised my formatting wasn't great.

above is a small sample of the data.

I am using column b as sample data but we are looking at hundreds of rows of data and the data in column b could be anywhere in the column.
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,436
Members
449,083
Latest member
Ava19

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