Hi,
In row 1, there are variable titles populated in each cell through Column GG. I am trying to isolate the partial text "mean". Once each cell title has been found, a new range directly under that title is to be activated with each cell value truncated, then rounded. How can I successfully loop through each column and complete this request? I have one of my samples of incorrect syntax in which I am trying to use. Any suggestions would be fabulous!!
Sub StrugglingHere()
Dim x As Long
Dim cell As Range
Dim found As Range
x = 5
Set found = Cells.Find(What:="mean", LookIn:=xlValues, lookat:=xlPartial, SearchOrder:=xlByRows, _
SearchDirection:=xlNext)
Do Until found <> ""
If found Like "*mean*" Then ActiveCell.Offset(-1, 0).Range("A1:A9").Select
'ActiveSheet.UsedRange.Rows.Select
For Each cell In Selection
cell.Value = Round(Left(cell.Value, x), 1)
Next
Loop
End Sub
In row 1, there are variable titles populated in each cell through Column GG. I am trying to isolate the partial text "mean". Once each cell title has been found, a new range directly under that title is to be activated with each cell value truncated, then rounded. How can I successfully loop through each column and complete this request? I have one of my samples of incorrect syntax in which I am trying to use. Any suggestions would be fabulous!!
Sub StrugglingHere()
Dim x As Long
Dim cell As Range
Dim found As Range
x = 5
Set found = Cells.Find(What:="mean", LookIn:=xlValues, lookat:=xlPartial, SearchOrder:=xlByRows, _
SearchDirection:=xlNext)
Do Until found <> ""
If found Like "*mean*" Then ActiveCell.Offset(-1, 0).Range("A1:A9").Select
'ActiveSheet.UsedRange.Rows.Select
For Each cell In Selection
cell.Value = Round(Left(cell.Value, x), 1)
Next
Loop
End Sub