Found this code to Find and Replace;
How would I change it so that it is only looking inside a certain column within a table rather than the worksheet as a whole?
Also I would need help adding on to this. For example, if optbtnAll was checked, it would replace all (either C or V) to R. It optbtnCleared was checked, it would only replace the letters in column [Status] from C to R. And if optbtnVirtual was checked it would replace the letters in column [Status] from V to R.
Code:
[COLOR=#00007f]Sub[/COLOR] FindReplaceAll()
[COLOR=#007f00]'PURPOSE: Find & Replace text/values throughout entire workbook[/COLOR]
[COLOR=#007f00]'SOURCE: www.TheSpreadsheetGuru.com[/COLOR]
[COLOR=#00007f]Dim[/COLOR] sht [COLOR=#00007f]As[/COLOR] Worksheet
[COLOR=#00007f]Dim[/COLOR] fnd [COLOR=#00007f]As[/COLOR] [COLOR=#00007f]Variant[/COLOR]
[COLOR=#00007f]Dim[/COLOR] rplc [COLOR=#00007f]As[/COLOR] [COLOR=#00007f]Variant[/COLOR]
fnd = "April"
rplc = "May"
[COLOR=#00007f]For[/COLOR] [COLOR=#00007f]Each[/COLOR] sht [COLOR=#00007f]In[/COLOR] ActiveWorkbook.Worksheets
sht.Cells.Replace what:=fnd, Replacement:=rplc, _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
SearchFormat:=[COLOR=#00007f]False[/COLOR], ReplaceFormat:=False
[COLOR=#00007f]Next[/COLOR] sht
[COLOR=#00007f]End[/COLOR] [COLOR=#00007f]Sub[/COLOR]
How would I change it so that it is only looking inside a certain column within a table rather than the worksheet as a whole?
Also I would need help adding on to this. For example, if optbtnAll was checked, it would replace all (either C or V) to R. It optbtnCleared was checked, it would only replace the letters in column [Status] from C to R. And if optbtnVirtual was checked it would replace the letters in column [Status] from V to R.
Last edited: