Return a value based on another 4 four cells

subtotalatom

New Member
Joined
Feb 3, 2020
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hello,

i need a formula to return a value based on 4 cells in different rows.

if the four cells have "W" in them then the collumn AA will retun a W. however if one of more Cells have L in them then it returns a L

KBJM Bet Club Tracker.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAA
1427/04/2021Cowdenbeath Scotland Other1.67£5WHalifax£5WBrentfordEngland Championship1.57£5WCharlton£5W#NAME?
Bet Tracker
Cell Formulas
RangeFormula
AA14AA14=IF((AND(G14=W,M14=W,S14=W,Y14=W)),"W","L")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G2:G9,M2:M9,S2:S9,Y2:Z9,Y122:Z144,S122:S144,M122:M144,G122:G144,Y76:Z76,S76,M76,G76,Y11:Z31,S11:S31,M11:M31,G11:G31Cell Value="L"textNO
G2:G9,M2:M9,S2:S9,Y2:Z9,Y122:Z144,S122:S144,M122:M144,G122:G144,Y76:Z76,S76,M76,G76,Y11:Z31,S11:S31,M11:M31,G11:G31Cell Value="W"textNO
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
If I understand correctly, you could try:

Excel Formula:
=if(and(G2="W";M2="W";S2="W";Y2="W");"W";if(or(G2="L";M2="L";S2="L";Y2="L");"L";""))

Just copy this to A2 and pull it down the range you need.
 
Upvote 0
You're just missing some quote marks

=IF(AND(G14="W",M14="W",S14="W",Y14="W"),"W","L")
 
Upvote 0
Another option
Excel Formula:
=IF(G14&M14&S14&Y14="WWWW","W","L")
 
Upvote 0
For all blanks try
Excel Formula:
=IF(G14&M14&S14&Y14="","",IF(G14&M14&S14&Y14="WWWW","W","L"))
 
Upvote 0
Solution

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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