Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use of range and edit cells in Excel 2

Status
Not open for further replies.

ChristianDK

Programmer
May 31, 2007
18
DK
Hello

I'm having 3 problems and hoping to find some help here. I'm trying to move info from one cell to another or the footer

1. Set Range("sheet1!A1") = Range("sheet2!b2")

Don't seem to work, any ideér's?


2. ActiveCell.FormulaR1C1 = "=sheet1!A1"

This result in A1 = "=sheet1'!A1'", any way avoid the "'"?


3. With ActiveSheet.PageSetup
.LeftFooter = Range("sheet1!b3")
End With

The problem here is, i'm unable to set the font size, it uses the default Excel size.

Really hope for some help :)
 




hi,
Code:
   Sheeets("Sheet1").Range("A1").Value = Sheets("Sheet2").Range("b2").value

 ActiveCell.Formula = "=sheet1!A1"
Hope this helps.

Skip,

[glasses] [red][/red]
[tongue]
 
Thanks Skip

Damn that was fast :p

Now I only need to find out how to edit the font size on the footer and my boos won't kill me :)
 





Turn on your macro recorder, change the font size, observe your redorded code.

Skip,

[glasses] [red][/red]
[tongue]
 
Try this:

ActiveSheet.PageSetup.LeftFooter = "&""Arial,Bold""&10" + Range("sheet1!b3")

or any other font&size, of course.
 
Hay Skip

Yes that sounds like a good ideér, but its not possibel to only edit the font size, Excel also rewrite the text in the footer in the same line. So if I need to get the info from a cell and then edit the font size I can't seem to make to work.
 
Kimed

Thanks a lot

Just some small info if anyone need it :)

ActiveSheet.PageSetup.LeftFooter = "&""Arial,Bold""&10" + Range("sheet1!b3")

Replace the + at the end with "&O" &

My client numbers, in the footer, starts with a 07 so Excel add it to the font size = huge

And ones more thanks :)
 
A trailing whitespace in "&10 " would do the same and be less confusing. Actually, I *had* it in my own code, but the line was longer with pile of irrelevant info and I forgot that this particular space was important when cleaning it for demonstration :D.
 
True, but if the cell only holds a number the macro can't run with the + for some reason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top