ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] excel function µLªk¦Û°Ê§ó·s

[µo°Ý] excel function µLªk¦Û°Ê§ó·s

½Ð°Ý«e½ú­Ì¡A¥H¤U¬O§Ú¼gªºfunction¡A¦ý¬O¹J¨ì¤@­Ó°ÝÃD¡A
·í Main!CH:CHÄæ¦ìªº­È¦³ÅÜ°Ê¡A¦ýfunctionªº­È«o¤£·|¦Û°Ê§ó·s
³o¬O­þÃä»yªk¦³°ÝÃD¡A¦A³Â·Ð«e½ú­ÌÀ°¦£¸Ñ´b¡AÁÂÁ¡C


Function safeStock(fab As String, partname As String)
Application.Volatile
Select Case fab
Case "A"   
   safeStock = Application.Evaluate("=ROUNDUP(SUMIF(Main!$CF:$CF,""" & partname & """,Main!CH:CH),0)")
Case "B"
    safeStock = Application.Evaluate("=ROUNDUP(SUMIF(Main!$CP:$CP,""" & partname & """,Main!CR:CR),0)")
Case "C"
safeStock = Application.Evaluate("=ROUNDUP(SUMIF(Main!$CZ:$CZ,""" & partname & """,Main!DB:DB),0)")
Case Else
    safeStock = "error"
End Select



End Function

¦^´_ 1# jerry045
»yªk¿ù»~·|¦³Error§a¡A§Afab¤£¬OA®Éºâªº­È¥»¨Ó´N¸òCHµLÃö

³Ì¦n¦Û¤v¹Á¸Õ¤U¤¤Â_ÂI©ÎStop
µM«áF8³v¦æ¬d¬Ý°ÝÃDÂI
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 2# stillfish00


    »yªk¨S¦³Åã¥Ü¿ù»~¡A²Ä¤@¦¸¿é¤J¦Û­q¨ç¼Æ¬OOKªº¡A¦ý¬O­×§ïÃöÁpªºÄæ¦ì«á¡A¤£·|¦Û°Ê§ó·s

TOP

¦^´_ 3# jerry045
ªþÀɬݬÝ
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

        ÀR«ä¦Û¦b : ¦Û¤v®`¦Û¤v¡A²ö¹L©ó¶ÃµoµÊ®ð¡C
ªð¦^¦Cªí ¤W¤@¥DÃD