
''-----------------------------------------------------------------------------------------------------------------------------------------------
'  It picks up "Shading Color Value" at "Current cell" of current ("After_tr") file. So place cursor properly before you start work !!!
'-----------------------------------------------------------------------------------------------------------------------------------------------
'  have to check that two (Before_tr and After_tr) files have the same sheets count and order of each and every sheets same - name does not matter at all, the order matters.
'  starts its work not at "Before_tr"but at "After_tr" file.
'  makes ".BAK" just in case. after all done, kill it


Dim 기준컬러: 기준컬러 = ActiveCell.Interior.Color
Application.ScreenUpdating = False
Dim 원본파일이름, 원본파일경로, 번역파일이름, 번역파일경로
번역파일이름 = ActiveWorkbook.Name
 Dim 다이아, 선택파일경로
 Set 다이아 = Application.FileDialog(1)
With 다이아
    .Title = "select Original file.."
    .Filters.Clear
    .Filters.Add "select Original file", "*.xlsx"
    .InitialFileName = ActiveWorkbook.Path
    .AllowMultiSelect = False
End With
If 다이아.Show <> -1 Then
    Beep 399, 123
    End
End If
If 다이아.SelectedItems.Count > 0 Then
    선택파일경로 = 다이아.SelectedItems(1)
End If
CreateObject("Scripting.FileSystemObject").CopyFile ActiveWorkbook.Path & "\" & ActiveWorkbook.Name, ActiveWorkbook.Path & "\" & ActiveWorkbook.Name & ".BAK"
원본파일경로 = 선택파일경로
Workbooks.Open 원본파일경로
원본파일이름 = ActiveWorkbook.Name
Workbooks(원본파일이름).Activate
  Dim 한셀, 시트, 행, 열, 시트색인, 선빵시트, 플랙
            시트색인 = 0
   For Each 시트 In Worksheets
            시트색인 = 시트색인 + 1
            Sheets(시트색인).Activate
            Workbooks(번역파일이름).Activate
            Sheets(시트색인).Activate
            Workbooks(원본파일이름).Activate
            For Each 한셀 In ActiveSheet.UsedRange.Cells
                  If 한셀.Interior.Color = 기준컬러 Then
                       플랙 = 플랙 + 1
                    If 플랙 = 1 Then 선빵시트 = 시트색인
                    한셀.Copy
                    행 = 한셀.Row
                    열 = 한셀.Column
                    Workbooks(번역파일이름).Activate
                    Cells(행, 열).PasteSpecial
                    Workbooks(원본파일이름).Activate
                  End If
            Next
   Next
Workbooks(원본파일이름).Activate
ActiveWorkbook.Close
Workbooks(번역파일이름).Activate
Application.ScreenUpdating = True
Sheets(선빵시트).Activate
Cells(1, 1).Select
MsgBox "Done !!!"
