VBA Macro - Run formula in a specific row based on specific text at the beginning of row.

margram

New Member
Joined
Jul 6, 2020
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a sheet that contains numerous parameters (up to 30) in a column. Each parameter has its own row in which I input data to and then screen against the applicable standards. I want to create a macro that goes through the list of parameters (in a fixed column) and for that row that the parameter is in run parameter specific formulas to change the fill or font color based on the user input concentration.

acenaphtheneAcenaphthene user input concentration - run specific formula (fill or font color change) here because we are in "acenaphthene" rowAcenaphthene user input concentration - run specific formula (fill or font color change) here because we are in "acenaphthene" rowAcenaphthene user input concentration - run specific formula (fill or font color change) here because we are in "acenaphthene" row
acenaphthyleneAcenaphthylene user input concentration - run specific formula (fill or font color change) here because we are in "acenaphthylene" rowAcenaphthylene user input concentration - run specific formula (fill or font color change) here because we are in "acenaphthylene" rowAcenaphthylene user input concentration - run specific formula (fill or font color change) here because we are in "acenaphthylene" row
anthraceneetcetcetc
benz(a)anthraceneetcetcetc
benzo(a)pyreneetcetcetc
benzo(b+j)fluorantheneetcetc
benzo(g,h,i)peryleneetcetcetc

I'm familiar with all the formulas to change color based on value.. etc., but I could use a pointer on how to write the code that will go through the column look for specific text and let me write a bunch of if statements for that row containing the specific text. Ideally, the formulas I would run for that row would start at a fixed column and end at the column that contains any values.

I've done this in conditional formatting but paste/overwrite makes it useless for some users.

Thank you in advance,
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,214,985
Messages
6,122,605
Members
449,089
Latest member
Motoracer88

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