[Help]Comparing and populating status based on data availability on two fields(Multiple If Formula)

scorpy

New Member
Joined
Jul 23, 2018
Messages
3
Hi Guys, I am working on an excel file where I have 300k rows and 160 columns, In few places, I have to compare two nearby fields and populate the status on the third field(Status field) based on below mentioned rules. I would like a single formula(Multiple ifs?) to accomplish the same.


In the below-mentioned example Cell A denotes the first field, Cell B denotes the second field and Status denotes the third field where this formula should go.





  • Status should be populated X if both Cell A and Cell B fields are blank.
  • Status should be populated A if Cell A is blank and Cell B is populated with some value.
  • Status should be populated D if Cell A is populated with some value and Cell B is blank.
  • Status should be populated V if Cell A and Cell B have same values
  • Status should be populated M if Cell A and Cell B have different values



Kindly help.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
[Table="width:, class:grid"][tr][td="bgcolor:#C0C0C0"][/td][td="bgcolor:#C0C0C0"]
A​
[/td][td="bgcolor:#C0C0C0"]
B​
[/td][td="bgcolor:#C0C0C0"]
C​
[/td][td="bgcolor:#C0C0C0"]
D​
[/td][/tr][tr][td="bgcolor:#C0C0C0"]
1​
[/td][td="bgcolor:#F3F3F3"]
[/td][td="bgcolor:#F3F3F3"]
[/td][td="bgcolor:#F3F3F3"]
Status
[/td][td="bgcolor:#F3F3F3"]
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
2​
[/td][td]
[/td][td]
[/td][td="bgcolor:#CCFFCC"]
X​
[/td][td="bgcolor:#CCFFCC"]C2: =CHOOSE(2*(A2 <> "") + (B2 <> "") + 1, "X", "A", "D", IF(A2 = B2, "V", "M"))[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
3​
[/td][td]
[/td][td]
1​
[/td][td="bgcolor:#CCFFCC"]
A​
[/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
4​
[/td][td]
1​
[/td][td]
[/td][td="bgcolor:#CCFFCC"]
D​
[/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
5​
[/td][td]
1​
[/td][td]
1​
[/td][td="bgcolor:#CCFFCC"]
V​
[/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
6​
[/td][td]
1​
[/td][td]
2​
[/td][td="bgcolor:#CCFFCC"]
M​
[/td][td][/td][/tr]
[/table]
 
Upvote 0

Forum statistics

Threads
1,223,992
Messages
6,175,829
Members
452,673
Latest member
LaMiaAvy

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