IF AND ELSE formula

LeighMacKay7

New Member
Joined
Oct 11, 2022
Messages
34
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Web
Hi,
I am hoping somebody can help me, please.

I am not even sure if I am going down the right route in terms of a formula.
I think it is an =IF(AND formula with multiple logic.
I just can't seem to apply the logic.


There are four different types of possibilities, which help me to get the 2022/23 Answer (as shown below)

2021/22 AnswerManual Changes (if required)2022/23 Answer
UT"Blank""Blank"
"Blank"UTUT
"Blank""Blank""Blank"
UTUTUT

If the table says "Blank". Normally it would contain nothing in the cell.

Basically, the Manual Changes (if required) column, overrides what is in the 2021/22 answer, even if it is "Blank". And returns the data in 2022/23 Answer column.

Can anybody point me in the right direction please.

Thanks in advance
Leigh
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
View attachment 97986
This one doesn't work either. It just returns "0".

The confusion is that. as shown on my initial message.
If the answer should be an empty cell. But is currently a UT. It returns UT.
That is NOT the same as the formula I posted. I am checking the Manual Changes column, not the Answer column.
The equivalent of my formula for your new data posting would be:
Excel Formula:
=IF(HO2="","",HO2)
 
Upvote 0
1693404859602.png


The 4 different permutations as to what I am trying to achieve are n rows 2 to 5, with an explanation in D.
 
Upvote 0
View attachment 97987

The 4 different permutations as to what I am trying to achieve are n rows 2 to 5, with an explanation in D.
That is what my formula does, except one key point/contradiction came across in your explanation.
You seem to say that you have " " in the cells (a single space). A single space is NOT the same as a blank cell/empty range. A space is something!!!

If you TRULY have single spaces, then you do not need anything special.
Simply using the formula:
VBA Code:
=B2
in cell C2 and copying down for all rows will return what you show in your grid above.
 
Upvote 0
2021/22 AnswerManual Changes (if required)2022/23 AnswerAnswer Notes
UT"Blank Cell""Blank Cell"If the Answer in B2 is " " and A2 is "UT". The returned answer in C2 should be " " (basically blank cell).
"Blank Cell"UTUTIf the Answer in B2 is "UT" and A2 is " ". The returned answer in C2 should be "UT"
"Blank Cell""Blank Cell""Blank Cell"If the Answer in B2 is " " and A2 is " ". The returned answer in C2 is " " (basically blank cell)
UTUTUTIf the Answer in B2 is "UT" and A2 is "UT". The returned answer in C2 is "UT".

What happens...
My colleague completes "Manual Changes (if required)" column, with what they believe to be the answer. It can either be "UT" or " " (blank cell).
Column B always supersedes column A "2021/22 Answer".
On occasions the answer in B2, is " " (Blank Cell). Even though in A2, it was originally UT. <<< It is this which is causing the issue.
 
Upvote 0
2021/22 AnswerManual Changes (if required)2022/23 AnswerAnswer Notes
UT"Blank Cell""Blank Cell"If the Answer in B2 is " " and A2 is "UT". The returned answer in C2 should be " " (basically blank cell).
"Blank Cell"UTUTIf the Answer in B2 is "UT" and A2 is " ". The returned answer in C2 should be "UT"
"Blank Cell""Blank Cell""Blank Cell"If the Answer in B2 is " " and A2 is " ". The returned answer in C2 is " " (basically blank cell)
UTUTUTIf the Answer in B2 is "UT" and A2 is "UT". The returned answer in C2 is "UT".

What happens...
My colleague completes "Manual Changes (if required)" column, with what they believe to be the answer. It can either be "UT" or " " (blank cell).
Column B always supersedes column A "2021/22 Answer".
On occasions the answer in B2, is " " (Blank Cell). Even though in A2, it was originally UT. <<< It is this which is causing the issue.
Did you read my last post and try it out?

And to be 100% clear, let me reiterate
A single space is NOT the same thing as a blank cell; a blank cell is something!

It is important to understand that. Otherwise you statements come off as confusing and contradictory, and we really cannot be sure that you are really saying.
So be sure what you are stating is accurate. You either have a blank cell or a single space (they are NOT the same thing).
 
Upvote 0

Forum statistics

Threads
1,215,095
Messages
6,123,072
Members
449,093
Latest member
ripvw

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