codye101
New Member
- Joined
- Jun 9, 2022
- Messages
- 3
- Office Version
- 365
- 2021
- 2019
- 2016
- 2013
- Platform
- Windows
I am currently trying to create a macro that finds a cell with a certain word and selects all cells in a row only if they contain data and replaces that data. This is what I have so far.
If Trim(rngCell) = "Bead Lot" Then
rngCell.Offset(0, 1).Select
Range(rngCell.Offset(0,1), ActiveCell.End(xlToRight)) = "14381"
End If
Currently it works but only if there is more than 1 column of data after the cell containing "Bead Lot" otherwise it fills the entire row with data instead of only replacing existing data.
If Trim(rngCell) = "Bead Lot" Then
rngCell.Offset(0, 1).Select
Range(rngCell.Offset(0,1), ActiveCell.End(xlToRight)) = "14381"
End If
Currently it works but only if there is more than 1 column of data after the cell containing "Bead Lot" otherwise it fills the entire row with data instead of only replacing existing data.