[英]Excel VBA to Assign Border to a group based on Column name and Cell Value
[英]VBA Getting column name based off if value is in that column
我通過這樣做讓它工作
Private Sub CommandButton1_Click()
Set iSheet = Worksheets("Locations")
iSheet.Range("P1").Interior.Color = RGB(100, 200, 1)
Match1 = Application.WorksheetFunction.Match(iSheet.Range("P1"), iSheet.Range("A1:A23"), 0)
Match2 = Application.WorksheetFunction.Match(iSheet.Range("P2"), iSheet.Range("B" & Match1 & ":N" & Match1), 0)
iSheet.TextBox1.Value = Application.WorksheetFunction.Index(iSheet.Range("B1:N1"), _
Match2)
End Sub
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.