Excel VBA Result based on Multiple Column & Conditions

bobbyexcel

Board Regular
Joined
Nov 21, 2019
Messages
88
Office Version
  1. 365
Platform
  1. Windows
Need some help on the below requirement. Please help me..

1654203219235.png


I want to update the Column E (Final Status) based on below Condition..
1. Col A & Col C should be equal
2. Col E should have Success / Failed ( don't consider any text other than Success or Failed)
3. if above 2 qualifies then consider the highest value (or nearest to 1) Status(col B) to be applied to all the cells in Col E for the matched cells (from point 1 & 2 above)

Then the final result should come as..

1654203706262.png
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
as you have 365, even those formules predict 5 "Success"
bobbyExcel.xlsb
ABCDEF
1JOBSTATUSSTARTENDCALCULFinal2
2XYZFAILED05-apr-2205-apr-220,0597SUCCESS
3XYZSUCCESS05-apr-2206-apr-220,7503SUCCESS
4ABCFAILED05-apr-2205-apr-220,0597SUCCESS
5ABCSUCCESS05-apr-2206-apr-220,7503SUCCESS
6ABCSUCCESS05-apr-2206-apr-220,625SUCCESS
Jobs
Cell Formulas
RangeFormula
F2:F6F2=INDEX(SORT(FILTER(TBL_Bobby2[[JOB]:[CALCUL]],([JOB]=[@JOB])*([START]=[@START])*(([STATUS]="failed")+([STATUS]="success"))),5,-1),1,2)
 
Upvote 0
Thanks for your reply @BSALV .. I've modified your script based on my requirements however I'm getting below error now.. Could you please help on this type mismatch error.

1654711906308.png
 
Upvote 0

Forum statistics

Threads
1,215,039
Messages
6,122,799
Members
449,095
Latest member
m_smith_solihull

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