Multiple condition check and performing calculation based on each row

venugopal.p

New Member
Joined
Jun 11, 2010
Messages
3
my excel sheet looks like this

row no ColumnA ColumnB ColumnC
1 Term log 101
2 Lots 20 102
3 mode Normal 103
4 Test cats 101
5 bus 10 102
6 goo max 104

If the column C value is 101 then I need to perform Column A+B in Column D.
If the column C value is 102 then I need to perform column B>20 then make column D value as Incorrect
If the column C value is 103 then Check column B=Normal then Column D is correct
Like this there are so many values and conditions
How to achieve this in VB macro?
Please help me
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hi

Please mention all your conditions. It can be performed using a macro. With the current conditions you gave we can do this by nested If conditions.

But if you need a macro I can do but you need to specify all your conditions and give a sample data.
 
Upvote 0
Hi,

My excel sheet is like this
Column A Column B
<table x:str="" style="border-collapse: collapse; width: 396pt;" width="528" border="0" cellpadding="0" cellspacing="0"><col style="width: 198pt;" width="264" span="2"> <tbody><tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt; width: 198pt;" width="264" height="17">Parameter Filename</td> <td class="xl24" style="width: 198pt;" width="264">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt;" height="17">Save Workflow log for these runs</td> <td class="xl24">0</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt;" height="17">Workflow Log File Directory</td> <td class="xl24">$PMWorkflowLogDir\MARKETING\CONSUMER\</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt;" height="17">Workflow Log File Name</td> <td class="xl24">wf_Country_edw_src.log</td> </tr> </tbody></table>

If my column A value is equal to Parameter file name then it has to check the value in column B for 20 (Same row), if it is not matching then column C (Same row) value should be incorrect.

Like this I need to check for Workflow log file name etc etc

So the same value would be repeated many times in a sheet, so wherever it comes I need to check the column A and I need to check column B (Same row) and then I have to populate column C

Hope you understood. Please rply me in case if you feel any difficult.

Please send a sample macro sheet to

venugopal.nsn "@" googlemail.com



Regards,
Venu
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,545
Members
449,089
Latest member
davidcom

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