1

だから私はこのようなものを得ました(すべて列A、別々の行にあります):

タイトル01

atext atext atext atext atext

btext btext btext btext btext

ctext ctext ctext ctext ctext

タイトル02

atext atext atext atext atext

btext btext btext btext btext

ctext ctext ctext ctext ctext

タイトル03

atext atext atext atext atext

btext btext btext btext btext

ctext ctext ctext ctext ctext

そして、次のように変更するための解決策が必要です:

タイトル01

Title01 - atext atext atext atext atext

Title01 - btext btext btext btext btext

Title01 - ctext ctext ctext ctext ctext

タイトル02

Title02 - atext atext atext atext atext

Title02 - btext btext btext btext btext

Title02 - ctext ctext ctext ctext ctext

タイトル03

Title03 - atext atext atext atext atext

Title03 - btext btext btext btext btext

Title03 - ctext ctext ctext ctext ctext

**基本的に - 各列に (タイトルの) プレフィックスを追加します。

ありがとうございました!**

4

3 に答える 3

2
  • セルB1に数式を入れます=A1
  • セルB2に数式を入れます=IF(MID(A2, 1,5)="Title", A2, B1)
  • その数式をデータの最後の行まで入力します。
  • セルC1に数式を入れます=IF(MID(A1, 1,5)="Title", A1, B1 & " - " & A1)
  • 記入してください。

これで、列Cに必要なものが表示されます。コピーしてから、特別な>値を貼り付けて、数式を削除できます。

于 2012-04-20T21:47:21.737 に答える
2
Sub Tester()    
    Dim c as Range, ttl as string

    for each c in selection.cells
       if lcase(c.value) like "*titletext*.txt" then
          ttl = c.value
       else
          if len(c.value)>0 and len(ttl)>0 then 
              c.value = ttl & " - " & c.value
          end if
       end if
    next c
End sub
于 2012-04-20T21:34:53.607 に答える
0

セル内のエントリを他のセルに「プッシュ」することはできません。他のセルは、タイトルを参照する数式である必要があります。だからあなたは次のようなものを持っているでしょう

    A
1   Title01
2   =A1&"atext atext atext atext atext"
3   =A1&"btext btext btext btext btext"

などなど。

于 2012-04-20T20:14:14.430 に答える