user3070818
user3070818

Reputation: 31

How to append characters to each element in a list

I have a column of strings that I want to append each of them with _at. Is there an easier way to do this in excel?

I have

D1
543
734

I want

D1
543_at
734_at

Upvotes: 3

Views: 6207

Answers (1)

Spacedman
Spacedman

Reputation: 94267

If it's an R question, paste0 on a data frame like this:

> d=data.frame(a=c("foo","bar","baz"),b=c(3,6,5))
> d
    a b
1 foo 3
2 bar 6
3 baz 5
> d$a=paste0(d$a,"_at")
> d
       a b
1 foo_at 3
2 bar_at 6
3 baz_at 5

If it's an Excel question, change the tags.

Upvotes: 4

Related Questions