Find and replace
On 25 Aug, 07:54, Kash wrote:
I have 3 columns in sheet totals, Date, ID & Status
and 3 cells in sheet Aug B1, B2 & B3 where we can enter Date, ID & Status
and when clicked on submit button, I need a macro to match date and ID from
sheet totals and replace Status again in sheet totals.
Can you add a calculated column that contains the CONCATENATE of the
Date and ID (with a separator), e.g. =CONCATENATE(A1,"|",B1)? Then
when you do a Find(), you need to use the Value2 of the date cell in
order to get it in the same format as the cell formula:
Dim Cell As Range
Set Cell = Sheets("totals").Cells.Find(Cells(1,1).Value2 & "|" & Cells
(1,2))
Sheets("totals").Cells(Cell.Row,Cell.Column+1) = Cells(1,3)
Code is untested.
Phil Hibbs.
|