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

¤½¦¡ Âàvba ­n«çÂà

¤½¦¡ Âàvba ­n«çÂà

¦U¦ì¥ý¶i¦n

¤@¦ê¨ç¼Æ¤½¦¡ ­n§â¥¦¼g¶iµ{¦¡½X¤¤

°õ¦æ¤§«á·Q«O¦³­ì¤½¦¡ ¥X²{¦b§Ú­nªºÀx¦s®æ¤¤

­n«ç¼g©O?

A1=IF(ISNUMBER(OFFSET(BG7,0,-1)),OFFSET(BG7,0,-1)-OFFSET(BG7,0,-2),"")

¦^´_ 1# alex520188
Range("A1") = "=IF(ISNUMBER(OFFSET(BG7,0,-1)),OFFSET(BG7,0,-1)-OFFSET(BG7,0,-2),"""")"

TOP

¦^´_  alex520188
Range("A1") = "=IF(ISNUMBER(OFFSET(BG7,0,-1)),OFFSET(BG7,0,-1)-OFFSET(BG7,0,-2)," ...
GBKEE µoªí©ó 2012-8-22 20:38


·Q¶¶«K°Ý¤@¤U
Range("A1") = "=IF(.....)" ¸ò
Range("A1").Formula ="=IF(.....)"
¦³¤°»ò¤£¦P©O@@ ?

TOP

¦^´_ 3# lalalada
  1. Option Explicit
  2. Sub Ex()
  3. [A1] = "=5+B2+D2"
  4. MsgBox Range("A1")
  5. MsgBox Range("A1").Formula
  6. End Sub
½Æ»s¥N½X

TOP

¦^´_  lalalada
GBKEE µoªí©ó 2012-8-23 07:21


©Ò¥H¬OFormula¬°¦r¦ê?
Cells(1, 8) = "=5+B2+D2"
Cells(2, 8).Formula = "=5+B2+D2"
¨â­Óµ²ªG¦b¤u§@ªí¤W¬Ý°_¨Ó¬O¤@¼Ëªº..

TOP

¦^´_ 4# GBKEE


    ÁÂÁÂGª©«üÂI  ¤U­±2ºØ¼gªk  ¸ò§Ú©Ò­nªºµ²ªG³£¬O¤@¼Ëªº??
Range("A1") = "=IF(.....)" ¸ò
Range("A1").Formula ="=IF(.....)"

©Ò¥H³£³q¥Î¬O¶Ü0.0?
  1. Sub NN123()
  2. Range("A1") = "=IF(ISNUMBER(OFFSET(G1,0,-1)),OFFSET(G1,0,-1)-OFFSET(G1,0,-2),"""")"
  3. Range("A2").Formula = "=IF(ISNUMBER(OFFSET(G2,0,-1)),OFFSET(G2,0,-1)-OFFSET(G2,0,-2),"""")"
  4. End Sub
½Æ»s¥N½X

TOP

¦^´_ 5# lalalada
Äæ­ÈÁö¤@¼Ë¡A¦ý¨ä¥Nªí·N¸q¦³¨ä¨Ç²§¡C¦p¹Ï¡G

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-8-23 11:33 ½s¿è

®t§O¬O
Formula ÄÝ©Ê             ¶Ç¦^©Î³]©w A1 ¼Ë¦¡µù¸Ñ¥H¤Î¥¨¶°»y¨¥¤¤ªºª«¥ó¤½¦¡¡CŪ/¼g Variant ¸ê®ÆÃþ«¬¡C
FormulaR1C1 ÄÝ©Ê   ¶Ç¦^©Î³]©wª«¥óªº¤½¦¡¡A¥Î¥¨¶°»y¨¥ªº R1C1 ¼Ë¦¡²Å¸¹ªí¥Ü¡CRange ª«¥ó¬°Åª/¼g Variant¡ASeries ª«¥ó¬°Åª/¼g String
  1. Option Explicit
  2. Sub Ex()
  3.     Dim e As Range
  4.     Range("d10") = "=d5"     'Formula            A1 ¼Ë¦¡
  5.     Range("d11") = "=r5c4" 'FormulaR1C1   R1C1 ¼Ë¦¡
  6.     For Each e In [d10:d11]
  7.     MsgBox e.Address(0, 0) & Chr(10) & "Formula " & e.Formula & Chr(10) & "FormulaR1C1 " & e.FormulaR1C1
  8.     Next
  9. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD