Selection.Find(What:=rngY, After:=ActiveCell, LookIn:=xlFormulas, _ Set ff = fso.getfolder("C:\Users\34664\summary\test") Set fso = CreateObject("scripting.filesystemobject") Any help is much appreciated! Sub Macro1() I know the code looks horrible but I think it makes sense to me. I am trying to get the value of A1, find that in column A of Test, go the column B same row, copy the value, come back to the workbook and paste as value. cell A1 in each workbook match the names in column A of the summary file Test. Just started learning vba this week so forgive me if my question is dumb.I have a summary file called Test and multiple workbooks. Find(what:=strng, LookIn:=xlValues, lookat:=xlPart) ' firstAddress Sub CheckAndClear(rng As Range, strng As String) With Range("T1", Cells(Rows.Count, "A").End(xlUp)) You could use Find() function to jump to relevant cells only: Option Explicit Looping through all cells of a given range could be time consuming If cl Like "Error" Or cl Like "Mistake" Then Try it like this to limit search range to columns A:T: Sub Clear_Text()įor Each cl In ActiveSheet.Range("A1:T"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |