SOLVED

Formula Help

Copper Contributor

I'm having difficulties figuring out a formula.  I thought I'd figured it out but then it didn't work and so I am at a loss.  I've attached a modified copy of the spreadsheet I've been using.

 

What I'm seeking on the "Vendor Sheet" tab:

  • I want to create a formula where if Cell E2 is Blank, it displays red like it currently does
  • The formula in Cell E2 also needs to check the "Values" tab, and if C2 = Green, it'll display Walmart in Cell E2 on the "Vendor Sheet" tab
  • The formula in Cell E2 also needs to check the "Values" tab, and If D2 = Green, it'll display Safeway in Cell E2 on the "Vendor Sheet" tab

Maybe there is an easier way to accomplish what I'm attempting too.  Basically if on the "Vendor Sheet" tab, Cell B5 is blank, I want cell E2 to be Red.  If Cell B5 has 1-6 characters, I want E2 to display "Walmart".  If it's 7-8 characters, I want E2 to display "Safeway".

 

Any help is greatly appreciated.  I thought I'd figured it out but my expertise in Excel is limited to what I learned in High School back in 2005.  It's driving me crazy being unable to reconcile the formula like I thought I could.

2 Replies
best response confirmed by KevinCommunitas (Copper Contributor)
Solution

@KevinCommunitas 

=IF(AND(LEN(B5)>=1,LEN(B5)<=6),"Walmart",IF(AND(LEN(B5)>=7,LEN(B5)<=8),"Safeway",""))

 

Is this the formula you are looking for?

@KevinCommunitas 

Formula in E2:

 

=IFS(B5="","",LEN(B5)<=6,"Walmart",LEN(B5)>6,"Safeway")

 

Change the formula in the conditional formatting rule for E2 to

 

=E2=""

1 best response

Accepted Solutions
best response confirmed by KevinCommunitas (Copper Contributor)
Solution

@KevinCommunitas 

=IF(AND(LEN(B5)>=1,LEN(B5)<=6),"Walmart",IF(AND(LEN(B5)>=7,LEN(B5)<=8),"Safeway",""))

 

Is this the formula you are looking for?

View solution in original post