Forum: CAT Tools Technical Help
Topic: Excel: How to translate highlighted but empty cells?
Poster: German-Dutch Engineering Translation
Post title: Macro
Here I’ve found a macro to extract highlighted cells to a ‘master’ worksheet.
Sub ExtractYellowCells()
Dim ws As Worksheet, MainWs As Worksheet, cell As Range
Set MainWs = Sheets("master") '-- change name as needed
For Each ws In Sheets(Array("Sheet1", "Sheet2")) 'add sheet names
If ws.Name MainWs.Name Then
For Each cell In ws.UsedRange
'if your cells are colored through conditional formatting, delete/comment below line & uncomment the line after
If cell.Interior.Color = vbYellow Then cell.Copy MainWs.Range(cell.Address)
'If cell.DisplayFormat.Interior.Color = vbYellow Then MainWs.Range(cell.Address) = cell.Value
Next
End If
Next
End Sub
From this, it's a long way to create a macro that exactly would perform the task required.
[Edited at 2022-03-17 14:20 GMT]
Topic: Excel: How to translate highlighted but empty cells?
Poster: German-Dutch Engineering Translation
Post title: Macro
Here I’ve found a macro to extract highlighted cells to a ‘master’ worksheet.
Sub ExtractYellowCells()
Dim ws As Worksheet, MainWs As Worksheet, cell As Range
Set MainWs = Sheets("master") '-- change name as needed
For Each ws In Sheets(Array("Sheet1", "Sheet2")) 'add sheet names
If ws.Name MainWs.Name Then
For Each cell In ws.UsedRange
'if your cells are colored through conditional formatting, delete/comment below line & uncomment the line after
If cell.Interior.Color = vbYellow Then cell.Copy MainWs.Range(cell.Address)
'If cell.DisplayFormat.Interior.Color = vbYellow Then MainWs.Range(cell.Address) = cell.Value
Next
End If
Next
End Sub
From this, it's a long way to create a macro that exactly would perform the task required.
[Edited at 2022-03-17 14:20 GMT]