help with VBA to check two condition for desired result

andyandy12345

New Member
Joined
Feb 26, 2011
Messages
11
Hi -need help to with VBA code to compare or lookup a value based on two inputs from separate columns.

Essentially I have two columns which need to be looked at to determine the desired result.

The columns will only contain the following inputs

column A column B Result
Text1 0 0
Text1 4 1
Text1 8 2
Text1 16 3
Text1 24 4
Text2 0 0
Text2 4 2
Text2 8 3
Text2 16 4
Text2 24 5


TIA
So if column A = Text1 AND column B = 4 THEN output the vlue in the Result column eg 1
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,224,606
Messages
6,179,862
Members
452,948
Latest member
UsmanAli786

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