OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

[Solved] Poss going about this all wrong..

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
esporter
Newbie
Newbie


Joined: 30 Jul 2012
Posts: 3

PostPosted: Mon Jul 30, 2012 2:45 pm    Post subject: [Solved] Poss going about this all wrong.. Reply with quote

[Solved]

Hi Gurus!

So imagine I have a spreadsheet, with one column of 10,000 names, like "Joe", "Mary", "Sam", etc.

I want each of these entries to actually say "Happy Birthday, Joe" and the next to say "Happy Birthday, Mary",etc.

Now I can type "Happy Birthday," in every #&$^ cell at the start of each line, but I shouldn't have to...

I am working off a spreadsheet that was given to me and can't have the columns altered, etc, so don't suggest I change then re-import the text. I have to work with this sheet. And the entry is more complicated than just a name, I'm simplifying...

I tried creating a macro; I recorded one, to go to the beginning of the cell, enter the text, then move down one cell, and repeat. I have worked with Excel but not OO. I found there was no way to assign this macro an F-key and just run it?? So I gave up on macros for now.

I created a column at the side of the names and had them all say Happy Birthday in them, and tried to merge the columns and keep the text. This seems only doable one row at a time. Again, I don't think I should need to sit here and do 10,000 "merge cells" operations.

I begin to think I'm missing some obvious way to do this. I'm starting to feel very dumb. The tutorials I dug up were dealing with creating charts and merging those cells, or with spreadsheets, but not in this particular way. Sad

I looked at CONCATENATE but wouldn't I have to program every cell? Wouldn't it be easier to just merge them in some way, or autotype them in?

Embarassed


Last edited by esporter on Tue Jul 31, 2012 12:42 pm; edited 2 times in total
Back to top
View user's profile Send private message
ozzie
OOo Advocate
OOo Advocate


Joined: 29 Jul 2010
Posts: 330
Location: victoria

PostPosted: Mon Jul 30, 2012 4:20 pm    Post subject: Reply with quote

Your names are in column A1 and down
In a cell off to the side somewhere type Happy Birthday, (this should include a space - F1
in my formula)
Put this formula in B1
Code:
=$F$1&A1

highlight B1 and double click the black box in the bottom right corner of the cell
_________________
If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).
Back to top
View user's profile Send private message
esporter
Newbie
Newbie


Joined: 30 Jul 2012
Posts: 3

PostPosted: Mon Jul 30, 2012 5:57 pm    Post subject: halfway there Reply with quote

thank you - it does not matter where I write "Happy Birthday "?

I actually created a spreadsheet like this for practice Razz

Your function does pick up the name in the A column, but only repeats that name in the B column. It does that well. I haven't gotten it to pick up any additional text and add it though. I appreciate your patience. Embarassed
Back to top
View user's profile Send private message
scsisys
OOo Enthusiast
OOo Enthusiast


Joined: 17 Dec 2009
Posts: 172

PostPosted: Mon Jul 30, 2012 6:59 pm    Post subject: Reply with quote

esporter...

It makes no difference what cell (other than a cell in the Name column) you place
Happy Birthday.

The formula below assumes Happy Birthday is in D1 and the Names starting in A1.
You have to assign an absolute address $ to the cell row number containing the
Happy Birthday text. The &" "& CONCATENATEs the two text fields and adds a
space between Birthday and the name in A1 ( and subsequent cells ).

=D$1&" "&A1

scsisys
_________________
OO 3.2.1
Win XP /SP3
Back to top
View user's profile Send private message
ozzie
OOo Advocate
OOo Advocate


Joined: 29 Jul 2010
Posts: 330
Location: victoria

PostPosted: Mon Jul 30, 2012 7:27 pm    Post subject: Reply with quote

In my example 'Happy birthday' is in F1
If you put 'Happy birthday' in G17 then change the formula from $F$1 to $G$17
_________________
If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).
Back to top
View user's profile Send private message
Sliderule
Super User
Super User


Joined: 29 May 2004
Posts: 2477
Location: 3rd Rock From The Sun

PostPosted: Tue Jul 31, 2012 8:49 am    Post subject: Reply with quote

There is another technique or trick to use to get the results you have described. That is to create / use a Style that is contains a Format that includes the text you want.

Steps to follow:

  1. Open your Calc file

  2. Press the F11 key ( or, from the Menu: Format -> Styles and Formatting F11 )

  3. Right click on the Default style, and, select New... from the pop-up

  4. Under tab, Organizer, assign a new Name for the Style, perhaps entering, Happy Birthday

  5. Click on Numbers tab

  6. Under Category , click on Text ( at the bottom )

  7. In the Format code box, enter:
    Code:
    Happy Birthday, @

  8. Press the OK button

  9. Select the range of cells with your name ( for example, A2:A10000 ), and, in the Styles and Formatting window, double click on your new Style

  10. Smile and say: "Gee Sliderule, that was easy, all I have to do is use Styles to format the text strings the way I want them to look!"

  11. Think to yourself, "now, all I have to do is follow the instructions at the bottom of Sliderule's post and mark the forum post as [Solved] "

I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to add [Solved] in your first post Title ( edit button ) if your issue has been fixed / resolved.
Back to top
View user's profile Send private message
esporter
Newbie
Newbie


Joined: 30 Jul 2012
Posts: 3

PostPosted: Tue Jul 31, 2012 12:41 pm    Post subject: Thanks! Reply with quote

Both are interesting approaches and I'll play with them for other reasons in the sheet, also. Thank you!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group