Saltar al contenido
PROGRAMAR EN VBA MACROS DE EXCEL

Como dar formato a las fuentes en Excel

(adsbygoogle = window.adsbygoogle || []).push({});

Domina Excel Hoy

Seguramente en un sin número de caso cuando se está realizando una macro se debe dar formato a las distintas celdas, presentándose el problema que algo tan simple no se recuerda como se hacer; pues bien este post tiene como finalidad recordar como dar formato a las fuentes en Excel; anteriormente se trabajó con cadenas de texto, tal vez te interese como trabajar con cadenas de texto, en ese caso visita el link.

Se ha publicado contenido relacionado con los formatos de fuente de Excel que quizás sean de utilidad como son: como establecer ancho alto mostrar ocultar filas y columnasestablecer color y bordes de celdasdeterminar color de celdassumar celdas de un mismo color.

Si necesitas es aprender o profundizar sobre la programación de macros con VBA este es unos de los mejores cursos on line que he visto en internet.

Descargando el ejemplo desde el link del final tendrás acceso a un archivo que contiene los mismos códigos que el que se muestra seguidamente, código con el cual se puede dar distintos tipos de formatos a la fuentes de Excel, como ser: color, tamaño, tipo, alineación, cursiva, mayúscula, etc.

Para establecer el formato Negrita en la celda C2 se usa:
Range(«C2»).Font.Bold = True

Si se requiere establecer una fuente en especial se usa el código que sigue, debiendo poner el nombre correcto de la fuente requerida:
Range(«C3»).Font.Name = «Arial»

Para establecer el tamaño de la fuente se utiliza:

Range(«C4»).Font.Size = 8
Si se desea subrayar la fuente, se puede usar:
Range(«C5»).Font.Underline = xlUnderlineStyleSingle
Para dar un vista de letra cursiva se debe utilizar:
Range(«C6»).Font.Italic = True
Siempre es preciso establecer el color de la fuente, se puede hacer con, teniendo la precaución de elegir el número del color deseado:
Range(«C7»).Font.Color = -16776961
Para la alineación horizontal de la fuente Derecha, Izquierda, Centrado, Justificado y Distribuido se usan los siguientes códigos respectivamente
Range(«C8»).HorizontalAlignment = xlRight
Range(«C9»).HorizontalAlignment = xlLeft
Range(«C10»).HorizontalAlignment = xlCenter
Range(«C11»).HorizontalAlignment = xlJustify
Range(«C12»).HorizontalAlignment = xlDistributed
Si se precisa dar formato para alineación vertical de la fuente, se utiliza para centrar, superior e inferior los siguientes códigos:
Range(«C13»).VerticalAlignment = xlCenter
Range(«C14»).VerticalAlignment = xlTop
Range(«C15»).VerticalAlignment = xlBottom
Para transformar en Mayúscula y Minúscula se usa:
Range(«C16») = UCase(Range(«C16»))
Range(«C17») = LCase(Range(«C17»))

Considera aportar a los fines de seguir manteniendo el sitio, suscribe al blog para recibir en tu correo todas las actualizaciones, dispones también de un canal de You Tube donde encontrarás explicaciones de macros con mayor detalle.

Suscribe a nuestro canal de You Tube para recibir en tu correo vídeos explicativos sobre macros interesantes, como  por ejemplo formulario que crea un listado de todas las hojas para poder luego seleccionarlas, buscar en listbox mientras escribes en textbox, ordenar hojas libro excel por su nombre, conectar Excel con Access y muchos ejemplos más.

Código que se inserta en un módulo

Sub DarFormato()
Application.ScreenUpdating = False

‘Negrita
Range(«C2»).Font.Bold = True

‘Fuente Arial
Range(«C3»).Font.Name = «Arial»

‘Tamaño fuente 12
Range(«C4»).Font.Size = 8

‘Subrayado
Range(«C5»).Font.Underline = xlUnderlineStyleSingle

‘Cursiva
Range(«C6»).Font.Italic = True

‘Color rojo
Range(«C7»).Font.Color = -16776961

‘Alineación horizontal derecha
Range(«C8»).HorizontalAlignment = xlRight

‘Alineación horizontal izquierda
Range(«C9»).HorizontalAlignment = xlLeft

‘Alineación horizontal centro
Range(«C10»).HorizontalAlignment = xlCenter

‘Alineación horizontal justificado
Range(«C11»).HorizontalAlignment = xlJustify

‘Alineación horizontal distribuido
Range(«C12»).HorizontalAlignment = xlDistributed

‘Alineación vertical superior
Range(«C13»).VerticalAlignment = xlCenter

‘Alineación vertical centro
Range(«C14»).VerticalAlignment = xlTop

‘Alineación vertical inferior
Range(«C15»).VerticalAlignment = xlBottom
   
‘Mayúscula
Range(«C16») = UCase(Range(«C16»))

‘Minúscula
Range(«C17») = LCase(Range(«C17»))

Application.ScreenUpdating = True
End Sub
Sub borraformato()
Application.ScreenUpdating = False
Range(«c2:c17»).ClearFormats
Application.ScreenUpdating = True
End Sub

Si te fue de utilidad puedes INVITARME UN CAFÉ y de esta manera ayudar a seguir manteniendo la página, CLICK para descargar en ejemplo en forma gratuita.


(adsbygoogle = window.adsbygoogle || []).push({});

If this post was helpful INVITE ME A COFFEE and so help keep up the page, CLICK to download free example.

Si te gustó por favor compártelo con tus amigos
If you liked please share it with your friends      

Entradas relacionadas

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Comentarios (124)

I am the owner of JustCBD Store label (justcbdstore.com) and I’m presently aiming to grow my wholesale side of business. I am hoping anybody at targetdomain share some guidance 🙂 I thought that the most ideal way to do this would be to connect to vape stores and cbd stores. I was really hoping if someone could recommend a trusted website where I can buy CBD Shops Sales Leads I am already considering creativebeartech.com, theeliquidboutique.co.uk and wowitloveithaveit.com. Unsure which one would be the best option and would appreciate any advice on this. Or would it be much simpler for me to scrape my own leads? Ideas?

Responder

Если налоговая вас проверяет позиции верховного суда банкротство юридических лиц

Responder

You ought to take part in a contest for one of the greatest blogs on the net. I will recommend this web site!

Responder

This is a really good tip especially to those new to the blogosphere. Simple but very precise info… Appreciate your sharing this one. A must read post!

Responder

Hi, I do think this is an excellent web site. I stumbledupon it 😉 I may come back yet again since I book-marked it. Money and freedom is the best way to change, may you be rich and continue to help other people.

Responder

Very good post. I will be experiencing some of these issues as well..

Responder

Can I just say what a relief to uncover an individual who truly understands what they’re talking about online. You actually realize how to bring an issue to light and make it important. More and more people really need to read this and understand this side of your story. It’s surprising you’re not more popular because you certainly possess the gift.

Responder

Very nice blog post. I absolutely appreciate this website. Thanks!

Responder

I quite like reading through an article that will make men and women think. Also, many thanks for allowing me to comment!

Responder

Way cool! Some extremely valid points! I appreciate you writing this write-up and also the rest of the site is also very good.

Responder

This web site truly has all of the information I wanted about this subject and didn’t know who to ask.

Responder

Right here is the perfect blog for anyone who really wants to understand this topic. You know a whole lot its almost hard to argue with you (not that I really will need to…HaHa). You definitely put a new spin on a topic that has been written about for a long time. Excellent stuff, just great!

Responder

Hi, I do believe this is a great site. I stumbledupon it 😉 I may come back yet again since I book-marked it. Money and freedom is the best way to change, may you be rich and continue to help other people.

Responder

Very nice article. I absolutely love this site. Stick with it!

Responder

You’re so cool! I do not believe I have read something like that before. So nice to find another person with unique thoughts on this issue. Seriously.. thanks for starting this up. This site is one thing that is required on the internet, someone with a little originality!

Responder

Your style is unique compared to other people I have read stuff from. Thank you for posting when you’ve got the opportunity, Guess I’ll just bookmark this blog.

Responder

Hello there! I simply would like to give you a big thumbs up for the excellent information you have here on this post. I’ll be coming back to your site for more soon.

Responder

I’m very pleased to uncover this website. I need to to thank you for your time for this fantastic read!! I definitely enjoyed every bit of it and i also have you saved as a favorite to see new information on your web site.

Responder

I have to thank you for the efforts you have put in penning this website. I am hoping to view the same high-grade blog posts by you in the future as well. In truth, your creative writing abilities has encouraged me to get my very own blog now 😉

Responder

I want to to thank you for this great read!! I absolutely enjoyed every little bit of it. I have you book-marked to check out new things you post…

Responder

I used to be able to find good advice from your content.

Responder

Your style is really unique in comparison to other folks I’ve read stuff from. Many thanks for posting when you’ve got the opportunity, Guess I’ll just bookmark this blog.

Responder

Hi! I simply would like to offer you a big thumbs up for the excellent info you have got right here on this post. I am coming back to your site for more soon.

Responder

I’m amazed, I must say. Rarely do I come across a blog that’s both educative and amusing, and without a doubt, you have hit the nail on the head. The issue is something too few folks are speaking intelligently about. I am very happy that I came across this during my search for something concerning this.

Responder

I’m excited to find this site. I need to to thank you for ones time for this particularly fantastic read!! I definitely really liked every little bit of it and i also have you saved as a favorite to look at new things in your website.

Responder

Excellent post! We are linking to this particularly great article on our site. Keep up the great writing.

Responder

I couldn’t resist commenting. Very well written!

Responder

Hi there it’s me, I am also visiting this site regularly,
this website is truly good and the visitors are really sharing pleasant thoughts.

Responder

I want to to thank you for this very good read!! I absolutely enjoyed every little bit of it. I have got you bookmarked to check out new stuff you post…

Responder

Yes! Finally someone writes about web hosting.

Responder

Greetings! Very useful advice within this post! It’s the little changes that will make the greatest changes. Thanks a lot for sharing!

Responder

You are so interesting! I don’t believe I’ve truly read through anything like that before. So nice to find someone with unique thoughts on this subject matter. Seriously.. thank you for starting this up. This web site is something that is needed on the internet, someone with a bit of originality!

Responder

I simply want to say I am all new to blogging and site-building and definitely enjoyed this blog site. Almost certainly I’m want to bookmark your blog . You certainly have very good stories. With thanks for sharing your webpage.

Responder

Spot on with this write-up, I actually feel this site needs far more attention. I’ll probably be returning to see more, thanks for the info!

Responder

You are so cool! I do not suppose I have read a single thing like that before. So good to discover someone with original thoughts on this subject. Seriously.. thank you for starting this up. This web site is one thing that’s needed on the web, someone with a bit of originality!

Responder

Great article! We will be linking to this great content on our website. Keep up the great writing.

Responder

After looking at a handful of the blog articles on your blog, I truly appreciate your way of blogging. I added it to my bookmark webpage list and will be checking back in the near future. Please check out my web site as well and tell me what you think.

Responder

I couldn’t refrain from commenting. Exceptionally well written!

Responder

Good site you’ve got here.. It’s hard to find good quality writing like yours these days. I honestly appreciate people like you! Take care!!

Responder

After looking into a few of the blog articles on your website, I really like your way of writing a blog. I book-marked it to my bookmark site list and will be checking back soon. Please check out my web site as well and tell me your opinion.

Responder

Way cool! Some extremely valid points! I appreciate you writing this article and also the rest of the site is also very good.

Responder

I just want to say I’m beginner to blogging and actually loved you’re web blog. More than likely I’m want to bookmark your website . You amazingly come with amazing articles. Thanks for sharing with us your web page.

Responder

I would like to thank you for the efforts you’ve put in penning this website. I am hoping to view the same high-grade blog posts by you later on as well. In fact, your creative writing abilities has inspired me to get my own site now 😉

Responder

I like reading a post that can make people think. Also, thank you for allowing me to comment!

Responder

Excellent article! We will be linking to this particularly great article on our site. Keep up the great writing.

Responder

Greetings! Very helpful advice in this particular article! It is the little changes which will make the most important changes. Many thanks for sharing!

Responder

Nice post. I learn something totally new and challenging on sites I stumbleupon on a daily basis. It will always be interesting to read content from other writers and use something from their sites.

Responder

Good post. I learn something totally new and challenging on blogs I stumbleupon everyday. It’s always interesting to read content from other writers and use something from their web sites.

Responder

Greetings! Very useful advice within this post! It is the little changes which will make the greatest changes. Thanks for sharing!

Responder

This page really has all the information and facts I needed concerning this subject and didn’t know who to ask.

Responder

Hi, I do think this is a great blog. I stumbledupon it 😉 I will return yet again since i have book marked it. Money and freedom is the best way to change, may you be rich and continue to help others.

Responder

Hi, There’s no doubt that your blog could be having web browser compatibility problems. Whenever I look at your web site in Safari, it looks fine however when opening in IE, it’s got some overlapping issues. I merely wanted to give you a quick heads up! Apart from that, great site!

Responder

I seriously love your site.. Very nice colors & theme. Did you make this web site yourself? Please reply back as I’m hoping to create my own personal site and want to learn where you got this from or what the theme is called. Appreciate it!

Responder

This is a topic which is near to my heart… Best wishes! Exactly where are your contact details though?

Responder

I was able to find good info from your articles.

Responder

This is the right site for everyone who really wants to understand this topic. You know a whole lot its almost hard to argue with you (not that I really will need to…HaHa). You definitely put a brand new spin on a topic that’s been discussed for decades. Wonderful stuff, just great!

Responder

This truly answered my trouble, thank you!

Responder

I relish, lead to I found just what I was having a look for.
You’ve ended my 4 day lengthy hunt! God Bless you
man. Have a great day. Bye

Responder

Hi there, just became alert to your website through Google, and located that it’s really
informative. I am gonna watch out for brussels.
I’ll be grateful when you continue this later on. Many individuals will be took
advantage of your writing. Cheers!

My webpage HelenFWidick

Responder

Nicce weblog here! Additionally your web site a lot up very fast!
What web host are you the use of? Can I geet
your affiliate link for yoyr host? I want my website loaded up as fast as yours lol

Responder

Useful info. Lucky me I discovered your web site by accident,
and I’m stunned why this coincidence didn’t took place in advance!
I bookmarked it.

Responder

Aw, this was an actually great article. In idea I want to place in writing such as this additionally? taking some time and also actual initiative to make a very good short article? but what can I claim? I postpone alot and by no means seem to obtain something done.

Responder

Hi, Neat post. There’s an issue together with your web site in web explorer,
could check this? IE still is the market leader and a
big portion of folks will leave out your magnificent writing because of this problem.

Responder

Hi there! Would you mind if I share your blog with my myspace group?
There’s a lot of people that I think would really appreciate your content.

Please let me know. Thank you

Responder

This web site is actually a walk-through for every one of the information you desired about this and didn?t understand who to ask. Glance below, as well as you?ll absolutely discover it.

Responder

WOW just what I was searching for. Came here by searching for keyword|

Responder

Spot on with this article, I truly assume this web site needs a lot more factor to consider. I?ll most likely be again to read much more, many thanks for that info.

Responder

Natural Releaf CBD | New York CBD Store with locations in Murray Hill, NY | Upper East Side, NY | White Plains, NY Serving New York City, NY and Westchester, NY High Quality CBD Products With Lab Test

Responder

Best view i have ever seen !

Responder

Love watching sunset !

Responder

Just desire to say your article is as astounding. The clearness
in your post is just cool and i could assume you’re an expert on this subject.
Well with your permission allow me to grab
your RSS feed to keep up to date with forthcoming post. Thanks a million and please carry on the rewarding
work.

Responder

Love watching sunset !

Responder

Best view i have ever seen !

Responder

Love watching sunset !

Responder

Hello my family member! I want to say that this article is amazing, nice written and come with almost all important infos. I would like to see extra posts like this .

Responder

cbd oil

Responder

After I initially left a comment I seem to have clicked on the -Notify
me when new comments are added- checkbox and from
now on each time a comment is added I get 4 emails with the exact same comment.
Perhaps there is a way you are able to remove me from that service?
Cheers!

Responder

I discovered your blog site on google as well as inspect a few of your early blog posts. Remain to keep up the great operate. I just added up your RSS feed to my MSN News Visitor. Looking for forward to finding out more from you later!?

Responder

I was very happy to locate this web-site. I wished to thanks for your time for this fantastic read!! I absolutely appreciating every little bit of it as well as I have you bookmarked to check out brand-new stuff you blog post.

Responder

Hello my family member! I wish to say that this post is awesome, nice written and include almost all vital infos. I would like to peer extra posts like this.

Responder

I actually have been surfing online more than three hours
today, but I in no way found any fascinating article like yours.

It’s beautiful price enough in my opinion. Personally, if
all webmasters and bloggers made good content as
you did, the net could be a lot more useful than before.

Take a look at my web-site: GerardFCagey

Responder

GEM-CAR auto repair shop management software is arguably the most comprehensive software of its kind currently available. Lauded for its easy to use modules including CRM, digital inspection and electronic punch clock: it provides the repair shop operator with a complete system to run the business. GEM-CAR puts the shop operator firmly in the driver’s seat. And if you are a fleet operator look for GEM-FLEET our fleet management software.

Responder

Thanks for keeping me updated! Articles like this are perfect reads to keep up with the industry!

Responder

My brother recommended I may like this website. He was totally right. This put up truly made my day. You can not believe just how much time I had spent for this information! Thank you!

Responder

Great beat ! I would like to apprentice while you amend your web site, how can i subscribe for a blog site? The account aided me a acceptable deal. I had been tiny bit acquainted of this your broadcast provided bright clear concept

Responder

An outstanding share, I simply provided this onto a colleague that was doing a little analysis on this. And he actually bought me morning meal because I found it for him. smile. So let me reword that: Thnx for the treat! But yeah Thnkx for spending the moment to review this, I feel strongly concerning it as well as enjoy learning more on this topic. Ideally, as you end up being know-how, would you mind upgrading your blog with more details? It is highly useful for me. Large thumb up for this blog post!

Responder

hi!,I like your writing so so much! share we be in contact more about your article on AOL? I need an expert in this house to solve my problem. Maybe that is you! Taking a look forward to peer you.

Responder

Hey there! I simply would love to offer a huge thumbs up for the fantastic details you have here on this post. I will certainly be coming back to your blog for even more quickly.

Responder

vedonlyönti

Responder

I will be on the lookout for more of your work.

Responder

whoah this blog is wonderful i love reading your posts. Keep up the great work! You know, many people are hunting around for this information, you could aid them greatly.

Responder

I simply desired to say thanks yet again. I do not know what I would’ve carried out without the entire thoughts revealed by you relating to that theme. It seemed to be a real horrifying circumstance for me, but finding out the specialized manner you processed the issue made me to leap with contentment. Extremely happy for the work and even believe you find out what a great job your are undertaking training the mediocre ones using your web page. I am sure you’ve never met any of us.

Responder

local hook up

Responder

I?d need to talk to you here. Which is not something I normally do! I delight in checking out a message that will certainly make individuals think. Likewise, many thanks for enabling me to comment!

Responder

Thanks for keeping me updated! Articles like this are perfect reads to keep up with the industry!

Responder

There are some intriguing moments in this short article yet I don?t know if I see every one of them center to heart. There is some validity yet I will take hold viewpoint till I look into it additionally. Excellent post, thanks and we desire extra! Included in FeedBurner as well

Responder

whoah this weblog is magnificent i like studying your posts. Keep up the good paintings! You realize, many persons are searching around for this information, you could help them greatly.

Responder

I am commonly to blog writing and also i really value your material. The article has truly peaks my rate of interest. I am mosting likely to bookmark your site and keep checking for new info.

Responder

This site was… how do you say it? Relevant!! Finally I’ve found something which helped me. Thanks!

Responder

Thanks for sharing excellent informations. Your web-site is so cool. I’m impressed by the details that you have on this site. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for extra articles. You, my friend, ROCK! I found simply the information I already searched all over the place and just couldn’t come across. What a perfect web-site.

Responder

What a great read – I’ll be sharing with my husband. This is appreciated!

Responder

I just could not depart your website prior to suggesting that I actually enjoyed the standard information a person provide for your visitors? Is gonna be back often to check up on new posts

Responder

Passing this on.

Responder

I will be sharing.

Responder

netticasinot, parhaat netticasinot, netticasino

Responder

This is interesting! Industry know-how really helps the group grow as a whole!

Responder

Great piece of content.

Responder

What a fun read – I’ll be sharing with my colleagues. This is appreciated!

Responder

CBD for the win!

Responder

Your style is very unique compared to other folks I have read stuff from. I appreciate you for posting when you have the opportunity, Guess I’ll just book mark this web site.

Responder

This website is truly a walk-through for every one of the details you desired about this and didn?t recognize who to ask. Peek here, as well as you?ll definitely find it.

Responder

Good post! We will be linking to this particularly great post on our website. Keep up the great writing.

Responder

Good website! I really love how it is easy on my eyes and the data are well written. I am wondering how I could be notified when a new post has been made. I’ve subscribed to your RSS feed which must do the trick! Have a nice day!

Responder

I’ve read several good stuff here. Certainly worth bookmarking for revisiting. I surprise how much effort you put to make such a wonderful informative website.

Responder

I’m curious to find out what blog system you have been working with? I’m experiencing some small security problems with my latest website and I would like to find something more safe. Do you have any suggestions?

Responder

It’s nearly impossible to find experienced people for this topic, however, you seem like you know what you’re talking about! Thanks

Responder

Wonderful article! We are linking to this great post on our site. Keep up the good writing.

Responder

Heya i’m for the first time here. I came across this board and I find It truly useful & it helped me out much. I hope to give something back and help others like you aided me.

Responder

Shopify fitness store

Responder

Love to see this every day !

Responder

Somebody necessarily lend a hand to make critically articles I would state. That is the very first time I frequented your web page and to this point? I surprised with the research you made to create this actual publish incredible. Wonderful activity!

Responder

Can I simply just say what a comfort to discover a person that genuinely knows what they are discussing over the internet. You definitely know how to bring an issue to light and make it important. More and more people must check this out and understand this side of the story. It’s surprising you aren’t more popular given that you most certainly have the gift.

Responder