=ЕСЛИ(B1="";0;ЕСЛИ(C1="";1;2))
=ЕСЛИ(И(B3<C3;B3<D3;B3<E3);B3;"")
=ЕСЛИ(И(C3<B3;C3<D3;C3<E3);C3;"")
=ЕСЛИ(И(D3<B3;D3<C3;D3<E3);D3;"")
=ЕСЛИ(И(E3<B3;E3<C3;E3<D3);E3;"")
Sub del()
Dim row As String
row = ActiveCell.row
Range("H" & row).Select
Selection.ClearContents
Range("Q" & row).Select
Selection.ClearContents
Range("A" & row).Select
Selection.ClearContents
End Sub
Sub perebor()
Dim i As Long
Dim j As Long
Dim bh As Range
Set wbs = ThisWorkbook.Worksheets("table1")
Set WBT = ThisWorkbook.Worksheets("mnd")
i = 3
j = 9
For Each bh In wbs.Range("M3:M11")
'белый -- 16777215
'серый -- 13421772
' зеленый -- 5880731
' оранжевый -- 4626167
mcolor = wbs.Cells(i, 13).Interior.Color
ncolor = wbs.Cells(i, 14).Interior.Color
If ncolor = 16777215 And mcolor = 5880731 Then
j = j - 1
wbs.Cells(i, 14).Value = WBT.Cells(j, 1).Value
wbs.Cells(i, 15).Value = WBT.Cells(j, 1).Value
wbs.Cells(i, 14).Interior.Color = WBT.Cells(j, 1).Interior.Color
wbs.Cells(i, 15).Interior.Color = WBT.Cells(j, 1).Interior.Color
ElseIf ncolor = 13421772 Then
wbs.Cells(i, 14).Value = wbs.Cells(i, 14).Value '(???)
End If
i = i + 1
Next bh
End Sub
import pandas as pd
import xlrd as xr
excelreed = xr.open_workbook('1.xlsx')
oneexcel = excelreed.sheet_by_index(0)
excelreed = xr.open_workbook('2.xlsx')
twoexcel = excelreed.sheet_by_index(0)
list_j = []
for i in range(1,oneexcel.nrows):
for j in range(1,twoexcel.nrows):
if twoexcel.row_values(j)[0] == oneexcel.row_values(i)[0]:
list_j.append(oneexcel.row_values(i) + twoexcel.row_values(j)[1:])
df = pd.DataFrame(list_j)
df.to_excel('out.xlsx', header=False, index=False)