klgrube
08-28-2018, 01:53 PM
Hi!
I have a spreadsheet that has 32 tabs and hundreds of rows. Many of the cells contain a formula that looks like '=if ($H1 = "ThisCompany",Q1,""). In reality, the only thing consistent about all of these formulas is the "This Company" part of the formula. The cell references can all be different (except the $H part at the beginning.) I need to write a macro that will quickly find and delete these formulas (resulting in an empty cell) if the formula contains "ThisCompany." Other cells in the same columns may have actual values and not formulas. I hope that's enough to get started with. Any suggestions? I just can't figure out through VBA how to check the partial contents of a formula.
Thanks!
I have a spreadsheet that has 32 tabs and hundreds of rows. Many of the cells contain a formula that looks like '=if ($H1 = "ThisCompany",Q1,""). In reality, the only thing consistent about all of these formulas is the "This Company" part of the formula. The cell references can all be different (except the $H part at the beginning.) I need to write a macro that will quickly find and delete these formulas (resulting in an empty cell) if the formula contains "ThisCompany." Other cells in the same columns may have actual values and not formulas. I hope that's enough to get started with. Any suggestions? I just can't figure out through VBA how to check the partial contents of a formula.
Thanks!