關於excel 函數問題 能請大大幫忙解決

各位大大我想在TOP1,TOP2,TOP3下面顯示對應的狀況(第一列)
但不知道要如何讓這樣顯示(B2,D2,F2),例如:B2顯示髒汙,B3刮傷
急需要,還請各位大大幫忙

關於excel 函數問題 能請大大幫忙解決
文章關鍵字
講中文

圖這麼小是給誰看?
wsx1130 wrote:
各位大大我想在TOP1...(恕刪)
有大大知道B2要怎麼輸入嗎??
拜託了!!!!!!
wsx1130 wrote:
有大大知道B2要怎...(恕刪)


希望您下次發問時,請上傳檔案,文字說明更清楚一點
也許可以比較快得到解答


b2
=INDEX($I$1:$W$1,1,MATCH($C2,$I2:$W2,0))

從圖片看不出來
萬一 top1 = top2 = top3 時,而且還有top4 top5 top6相等
例如 i2、j2、k2、L2、M2、N2 剛好都等於3時
您要用什麼條件、限制,從6個成立的儲存格中,選出3個項目,公式可是會變的很複雜的
最好改用vba處理

非常感謝大大的指導
確實碰到相同的狀況了
但小弟不會vba,有辦法用函數解決嗎?
如果是VBA要如何寫呢?

檔案
等了3天,您還是不回應我的問題,這要如何幫您
請仔細看看回覆好嗎?


所以,我用自己喜歡的方式,修改一下表格
排版、表格如果不喜歡,請自己想辦法,我不會幫您修改程式


Function gettop(r As Integer, top As Integer)

Application.Volatile
Dim DataArray As Object, temp As Object, n, topname As String
Set DataArray = CreateObject("System.Collections.ArrayList")
Set temp = CreateObject("System.Collections.ArrayList")

For i = 1 To 21
If Sheets("sheet1").Cells(r, i + 5) <> "" Then
temp.Add Sheets("sheet1").Cells(r, i + 5).Value
End If
Next i

temp.Sort: temp.Reverse

For Each n In temp
If Not DataArray.contains(n) Then DataArray.Add (n)
Next

If top > DataArray.Count Then
gettop = ""
Exit Function
End If

For i = 1 To 21
If Sheets("sheet1").Cells(r, i + 5).Value = DataArray(top - 1) Then
topname = topname & Sheets("sheet1").Cells(1, i + 5) & "(" & Sheets("sheet1").Cells(r, i + 5) & ")" & ","
End If
Next i

gettop = topname

Set DataArray = Nothing
Set temp = Nothing


End Function

附加壓縮檔: 201707/mobile01-62390a65ee3913b2ec6712d5eeab041b.zip
非常感謝大大,真的好厲害
我完全沒有想到還有這種狀況,但是您的真的能解決
謝謝您,非常感謝

文章分享
評分
評分
複製連結

今日熱門文章 網友點擊推薦!