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

[µo°Ý] VBA µ{¦¡

[µo°Ý] VBA µ{¦¡

¥Ø«e·Q¼g¤@¬q¤pµ{¦¡¡A¨ä·§©À¦p¤U
1.¨ì¸ê®Æ°Ï§ì¨úÅܼÆX(C7~C12ªº­È)
2.§â¸ê®Æ°ÏªºC7ªº­È±a¤J­pºâ°Ïªº¤èµ{¦¡Z=2X+5
3.¤èµ{¦¡Z=2X+5ªºµ²ªG¥Î½Æ»s¶K¤Wªº¤è¦¡¡A¿é¤J¦Aµ²ªG°Ï
4.§â¸ê®Æ°ÏªºC8ªº­È±a¤J­pºâ°Ïªº¤èµ{¦¡Z=2X+5


¤@ª½µL­­°j°é¨ì¨S¦³­È

¤j­P¤Wªº®æ¦¡¦pªþ¥ó
vba test.zip (8.68 KB)

¦³¤j¤j¥i¥HÀ°¦£¼g¶Ü?
ÁÂÁÂ

¦^´_ 1# 8960614123


¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim xFormula As String, i As Integer, C As Integer
  4.     xFormula = Sheets("­pºâ°Ï").Range("D8").FormulaR1C1 '­pºâ¤½¦¡
  5.     i = 7
  6.     Do While Sheets("¸ê®Æ°Ï").Range("C" & i) <> ""    '°j°é: While(ª½¨ì±ø¥ó¤£¦¨¥ß) ¸ê®Æ°Ï¤£¬OªÅ®æ
  7.         
  8.         With Sheets("µ²ªG°Ï").Range("C6").Offset(C)
  9.             .Cells = Sheets("¸ê®Æ°Ï").Range("C" & i) '¼g¤U¸ê®Æ
  10.             .Cells(1, 2) = xFormula                  '¼g¤U¤½¦¡
  11.             .Cells(1, 2).Value = .Cells(1, 2).Value  '¤½¦¡Âର­È
  12.         End With
  13.         C = C + 3   '¨C¤@µ§ªºµ²ªGªÅ¨â¹j
  14.         i = i + 1   '¤U¤@µ§¸ê®Æ
  15.     Loop
  16. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¶¢¤HµL¼Ö½ì¡A¦£¤HµL¬O«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD