Multiple IF criteria in VBA Excel

alexgomes

New Member
Joined
Mar 7, 2016
Messages
2
Hi,

I need your help related with an multiple criteria IF.

I'm trying to create an IF statement with multiple criteria, based on values from different columns.

The first criteria is related with a comparison from column K with L. If the value exists, than, in column C is displayed "True".

ActiveCell.FormulaR1C1 = "=IF(RC[8]=RC[9],""True"")"
Range("C2").AutoFill Destination:=Range("C2:C" & lastRow)

My issue is, that I need to the same, comparing column K with M. But that overwrites the previous IF in column C.

Besides this, I need to add in column C other criterias displayed as "True", but based on other columns values, like display "true" if a value is bigger or lower than e.g. 100.

I believe this a simple IF statement, but I don't enough knowledge to write the code line.

I would be very appreciated if someone can help me on this.

Kindest regards,
Alex
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
You have to give us the specifics in order for us to help you. Saying you need other criteria, but not specifying those means we can't help.

Spell the whole thing out in plain terms.

K=L and K=M? C=?, give us all the criteria and we can help.
 
Upvote 0
Hi, Many thanks for your reply.

Will try to clear enough, as far as my english allows.

I need to have column (C) saying if it's "true" based on other columns criteria.

1 - Compare the column K with L. K has a number/text value. If exists in in both columns then "true" will be displayed in column C;
2 - Compare the column K with M. K has a number/text value. If exists in in both columns then "true" will be displayed in column C;
3 - Column B. Text only. If any part of the text has "col" or "PB" on any row of column B, then "true" will be displayed in column C;
4 - Column S. Has negative and positive numbers. If any value is >100 or < -100, then "true" will be displayed in column C;
5 - Column AG. Numbers only. If any value is >10 or < -10, then "true" will be displayed in column C;
6 - After this steps I need to sort the column C by "true";
7 - Color the "true" cells in yellow.

Will this helps?

Once again, many thanks for your help.

Regards,

Alex
 
Upvote 0

Forum statistics

Threads
1,215,949
Messages
6,127,877
Members
449,410
Latest member
adunn_23

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