Nice programing

Excel에서 열의 모든 셀에 동일한 텍스트 추가

nicepro 2020. 11. 12. 20:13
반응형

Excel에서 열의 모든 셀에 동일한 텍스트 추가


Excel에서 열의 모든 셀에 텍스트를 추가하려면 어떻게해야합니까? 끝에 쉼표 ( ",")를 추가해야합니다.

예:

email@address.com 로 변하다 email@address.com,

데이터 샘플 :

m2engineers@yahoo.co.in
satishmm_2sptc@yahoo.co.in
threed_precisions@rediffmail.com
workplace_solution@yahoo.co.in
threebworkplace@dataone.in
dtechbng@yahoo.co.in
innovations@yahoo.co.in
sagar@mmm.com
bpsiva@mmm.com
nsrinivasrao@mmm.com
pdilip@mmm.com
vvijaykrishnan@mmm.com
mrdevaraj@mmm.com
b3minvestorhelpdesk@mmm.com
sbshridhar@mmm.com
balaji@mmm.com
schakravarthi@mmm.com
srahul1@mmm.com
khramesh2@mmm.com
avinayak@mmm.com
rockindia@hotmail.com

이것이 당신을 위해 작동하는지 확인하십시오.

  • 모든 데이터는 A 열 (1 행에서 시작)에 있습니다.
  • B 열 1 행에 = A1 & "를 입력합니다."
  • 이렇게하면 B1 셀이 쉼표가 추가 된 A1이됩니다.
  • 이제 셀 B1을 선택하고 셀의 오른쪽 하단에서 모든 행을 아래로 드래그합니다. 그러면 수식이 복사되고 해당 열 A 값이 사용됩니다.

그게 다야!


간단한 "&"함수입니다.

=cell&"yourtexthere"

예-휴대 전화에 Mickey가 표시되고 Mickey Mouse를 원합니다. 미키는 A2에 있습니다. B2에서

=A2&" Mouse"

그런 다음 값을 복사하여 "선택하여 붙여 넣기"하십시오.

B2 now reads "Mickey Mouse"

간단 해......

=CONCATENATE(A1,",")

: A1 셀에 email@address.com이면 다른 셀에 작성 = CONCATENATE (A1, ",")

이 공식 후에 email@address.com 당신은 email@address.com 을 얻게 될 것입니다 .

수식 제거 : 해당 셀을 복사하고 alt + e + s + v를 사용 하거나 특수 값을 붙여 넣습니다.


표시 목적으로 만 문자를 추가하려는 경우에는 추가 열이나 VBA를 사용할 필요가 없습니다 .

이 게시물에서 알 수 있듯이 다음과 같이 하면 됩니다.

  1. 서식을 적용 할 셀을 선택하십시오.
  2. Home탭을 클릭 하십시오
  3. 클릭 Number
  4. 고르다 Custom
  5. 에서 Type텍스트 상자, 당신은 당신이 원하는 문자 숫자 영 내부를 배치하여 서식을 소망하는 입력합니다.

Example of such text for formatting:

  • If you want the cell holding value 120.00 to read $120K, type $0K

pretty simple....you could put all of them in a cell using the comcatenate function

=CONCATENATE(A1,", ",A2,", ", and so on)

Highlight column and then cntrl+f. Find and replace find ".com" replace ".com, "

and then one for .in find and replace find ".in" replace ".in, "


Select the range of cells, type in the value and press Ctrl+Enter. This, of course, is true if you want to do it manually. If you want to do it in code, please, be more specific, what do you use.


I just wrote this for another answer: You would call it using the form using your example: appendTextToRange "[theRange]", ",".

Sub testit()
appendTextToRange "A1:D4000", "hey there"
End Sub
Sub appendTextToRange(rngAddress As String, append As String)
Dim arr() As Variant, c As Variant
arr = Range(rngAddress).Formula
For x = LBound(arr, 1) To UBound(arr, 1)
    For y = LBound(arr, 2) To UBound(arr, 2)
        Debug.Print arr(x, y)
        If arr(x, y) = "" Then
            arr(x, y) = append
        ElseIf Left(arr(x, y), 1) = "=" Then
            arr(x, y) = arr(x, y) & " & "" " & append & """"
        Else
            arr(x, y) = arr(x, y) & " " & append
        End If
    Next
Next
Range(rngAddress).Formula = arr
End Sub

Put the text/value in the first cell, then copy the cell, mark the whole colum and 'paste' the copied text/value.

This works in Excel 97 - sorry no other version available on my side...


Simplest of them all is to use the "Flash Fill" option under the "Data" tab.

  1. Keep the original input column on the left (say column A) and just add a blank column on the right of it (say column B, this new column will be treated as output).
  2. Just fill in couple of cells of Column B with actual expected output. In this case :

         m2engineers@yahoo.co.in, 
         satishmm_2sptc@yahoo.co.in,
    
  3. Then select the column range where you want the output along with the first couple of cells you filled manually ..... then do the magic...click on "Flash Fill".

It basically understands the output pattern corresponding to the input and fills the empty cells.


Type it in one cell, copy that cell, select all the cells you want to fill, paste.

Alternatively, type it in one cell, select the black square in the bottom-right of that cell, drag down.

참고URL : https://stackoverflow.com/questions/3179513/append-same-text-to-every-cell-in-a-column-in-excel

반응형