Below is my initial code that can't get past the first line.
Any help would be greatly appreciated.Please Login or Register to view this content.
Below is my initial code that can't get past the first line.
Any help would be greatly appreciated.Please Login or Register to view this content.
what exactly are you trying to do?
Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.
Please,mark your thread [SOLVED] if you received your answer.
I'm trying to clear the contents of all data in each column that has the text conaining "D_MA" in that columns row 2. For instance, if cell F2 has 30D_MA, I want the macro to clear all contents in Column "F" -- but to do this for all columns that contain "D_MA" in row 2.
if right(cells(2,i),4) = "D_MA" then ..... ?
Oh ok, that's sorta what it looked like but was hard to tell.
On it!
Please Login or Register to view this content.
That will do it. Run this while the sheet you would like to operate on is the active sheet. Save both the Sub and the Function to a module, and run the sub.
The macro will prompt you for the "text to obliterate" - just enter "D_MA" and press enter.
It will then look on the 2nd row for anything containing D_MA (partial match, so D_MA just needs to be part of the text) and clearContents on the entire column. :D
No problem That FindAll function is VERY handy to keep around, you'll use it alot.
Please mark your thread solved.
To mark your thread solved do the following:
New Method
-Go to the top of the first post
-Select Thread Tools
-Select Mark thread as Solved
Old Method
- Go to the first post
- Click edit
- Click Advance
- Just below the word "Title:" you will see a dropdown with the word No prefix.
- Change to Solve
- Click Save
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks