こんにちは誰でも
追加の形式でゼロ以外の最小関数を使用して値を強調表示する必要がありますが、できません:(
私の問題を解決するのを手伝ってください。
ありがとうございます。
追加の形式でゼロ以外の最小関数を使用して値を強調表示する必要がありますが、できません:(
私の問題を解決するのを手伝ってください。
ありがとうございます。
セルQ12:Q18の最小値に基づいて、範囲D12:AH18のすべてのデータを並べ替えたいと思います。これは、セクションNo.1の行の一番上に表示される必要があり、No.2からセクションなどの別のセクションでも同じです。 No.712と、このような後、行セクションの一番上に最小数のセルQが表示されたら、背景に黄色で表示され、セル「I」のベンダー名も同じ黄色の背景を表示する必要があります。
Sub ExtendOffice_Sort()
Dim xExtendRg, xOfficeSRgC As Range
Dim xRg As Range
Dim xRangeAddress As String
Dim xNum, xCSNum, xCENum, xRSNum, xRSNum2, xRENum As Integer
Dim xRCount As Integer
Dim xBol, xBolWS As Boolean
Dim xStr1, xStr2 As String
Dim xWSh As Worksheet
Dim xSortColumn As Integer
On Error Resume Next
Set xExtendRg = Application.InputBox("Please select the range with data to be sorted:", "ExtendOffice - Kutools for Excel", , , , , , 8)
If xExtendRg Is Nothing Then Exit Sub
Set xOfficeSRgC = Application.InputBox("Please select the column with values to be sorted from smallest to largest:", "ExtendOffice - Kutools for Excel", , , , , , 8)
If xOfficeSRgC Is Nothing Then Exit Sub
xNum = Application.InputBox("Please enter a number of rows to be sorted in a section:", "ExtendOffice - Kutools for Excel", , , , , , 1)
Set xRg = xExtendRg
Set xWSh = xRg.Worksheet
xWSh.Activate
xSortColumn = xOfficeSRgC.Column
xRCount = xRg.Rows.Count
xCSNum = xRg.Column
xCENum = xCSNum + xRg.Columns.Count - 1
xRSNum = xRg.Row
xRENum = xRSNum + xRCount - 1
xRSNum2 = xRSNum
xRSNum = (xRSNum + xNum) - 1
xBol = True
xBolWS = Application.ScreenUpdating
Application.ScreenUpdating = False
Do While xBol
xStr1 = xWSh.Cells(xRSNum2, xCSNum).Address & ":" & xWSh.Cells(xRSNum, xCENum).Address
xStr2 = xWSh.Cells(xRSNum2, xSortColumn).Address & ":" & xWSh.Cells(xRSNum, xSortColumn).Address
'Debug.Print xStr1 & " - " & xStr2
xWSh.Sort.SortFields.Clear
xWSh.Sort.SortFields.Add Key:=Range(xStr2) _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With xWSh.Sort
.SetRange Range(xStr1)
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
xWSh.Sort.SortFields.Clear
If (xRSNum + xNum) >= xRENum Then
If xRSNum = xRENum Then
xBol = False
Else
xRSNum2 = xRSNum + 1
xRSNum = xRENum
End If
Else
xRSNum2 = xRSNum + 1
xRSNum = (xRSNum + xNum)
End If
Loop
Application.ScreenUpdating = xBolWS
End Sub
今、私はそれを私のテーブルで約712回実行し、毎回データを選択する必要があります
こんにちはアマンダ様
私のリクエストを読んでくれたタンクとあなたの親切な返事に感謝します
5000行を超えるデータを含むテーブルがあります…
この表では、7〜11行ごとに、列Aのセルを結合した単一の番号があります。
1つの行番号を持つ各パーツには、それぞれが独自の価格を持つXNUMXつのアイテムに関する複数のベンダーのデータが含まれています。必要なのは、各セクションの日付を、行セクションの上のベンダーの低価格で並べ替えることです😊
ご覧のとおり、2つのリクエストがあります。
1:最低価格のセクションにある私のデータの各部分のデータを並べ替えます。
2:最初の行で最低価格を強調表示します
昨日、XNUMX番目のリクエストを解決しましたが、最初のリクエストに対する回答が見つかりませんでした。
あなたが私の問題を解決することができれば私は感謝します:)
残念ながら、テーブルの画像をアップロードできませんでした:(