Saltar al contenido
PROGRAMAR EN VBA MACROS DE EXCEL

Rellenar celdas con mismo valor que anterior

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

En un foro me preguntan como rellenar celdas con el mismo valor que la celda anterior y hasta la última celda con datos, en un post anterior presenté un ejemplo sobre como rellenar celdas vacías con cero; ahora se presenta un ejemplo sobre como rellenar celdas con el mismo valor, estas macro guarda cierta relación con recorrer filas contando celdas con datos, como así también con la macro recorrer filas encontrar un dato y sumarlo, la diferencia es que en una cuenta las celdas con datos y en la otra los suma.

Antes de seguir con el desarrollo y en el caso que no tengas conocimiento suficiente sobre el manejo de hojas de Excel, te recomiendo antes de introducirte en el mundo de las macros, que leas un excelente libro sobre Excel el que te ayudará manejar las planillas de cálculo, debes hacer click acá, si quieres un libro sobre Excel, en inglés, entonces debes hacer click acá.

MASTERCARD PAYONEER

Desde el link del final se puede descargar el archivo de ejemplo de esta manera podrás ver su funcionamiento en forma más detallada. El código de VBA o Macro de Excel realiza un bucle con los comando While… Wend a los  fines de recorrer todas las celdas, determinando el valor de la celda con dato, luego empieza a recorrer las celdas, rellenando con el mismo valor hasta que encuentre una celda con datos, ahí la variable toma el valor de la última celda con datos encontrada rellenando con ese valor la celdas vacías, repitiendo el bucle hasta la última fila con datos.

Código que se debe insertar en un módulo

Sub rellena()
Dim uf, fila As Integer
uf = Sheets(«hoja1»).Range(«A» & Rows.Count).End(xlUp).Row
fila = 1
While fila < uf
If Sheets(«hoja1»).Cells(fila, 1) <> Empty Then
a = Sheets(«hoja1»).Cells(fila, 1)


     

Else
Sheets(«hoja1»).Cells(fila, 1) = a
End If
fila = fila + 1
Wend
End Sub

Otros post de utilidad:

  1. Recuperar password de hoja bloqueada
  2. Abre explorador de archivo de Windows e inserta foto
  3. Abre explorador de archivo de Windows
  4. Combobox suma datos repetidos
  5. Busca un dato en todas las hojas de excel
  6. Combobox incrustado en Excel
  7. Formulario para insertar datos en hoja de excel
  8. Formulario de alera y envío de mail
  9. Tutoriales sobre VBA
  10. Llenar combobox y buscar datos
  11. Mensaje de Alerta y envío de mail con Excel
  12. Combobox que lista hojas de excel y las selecciona
  13. Busca un dato en todas las hojas de excel

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 (80)

I am the owner of JustCBD Store company (justcbdstore.com) and I am currently aiming to expand my wholesale side of company. I really hope that someone at targetdomain give me some advice 🙂 I thought that the most suitable way to do this would be to connect to vape stores and cbd retailers. I was really hoping if anyone could recommend a qualified web site where I can get Vape Shop B2B Sales Leads I am presently taking a look at creativebeartech.com, theeliquidboutique.co.uk and wowitloveithaveit.com. Unsure which one would be the best option and would appreciate any assistance on this. Or would it be much simpler for me to scrape my own leads? Suggestions?

Responder

I need to to thank you for this fantastic read!! I certainly loved every little bit of it. I’ve got you bookmarked to check out new stuff you post…

Responder

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

Responder

You ought to take part in a contest for one of the highest quality websites on the net. I will highly recommend this website!

Responder

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

Responder

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

Responder

I simply want to tell you that I’m very new to blogging and site-building and really liked you’re web site. Probably I’m want to bookmark your website . You certainly come with beneficial articles. Thank you for sharing with us your web-site.

Responder

I think this is one of the most vital information for me.
And i’m glad reading your article. But wanna remark on some
general things, The website style is wonderful,
the articles is really excellent : D. Good job, cheers
adreamoftrains best web hosting 2020

Responder

I savor, lead to I found exactly what I used to be taking a look for.

You have ended my four day long hunt! God Bless you man. Have a
great day. Bye

Responder

I am no longer certain the place you’re getting your info, however
great topic. I needs to spend a while studying more
or understanding more. Thanks for fantastic information I was on the lookout for this info for my mission.

Responder

I simply want to say I am very new to blogs and definitely liked you’re page. Most likely I’m want to bookmark your blog post . You absolutely have exceptional posts. Kudos for sharing with us your webpage.

Responder

This is the right blog site for any individual who intends to find out about this subject. You recognize a lot its nearly hard to argue with you (not that I in fact would want?HaHa). You definitely placed a brand-new spin on a subject thats been covered for years. Fantastic stuff, simply terrific!

Responder

pitkävetovihjeet

Responder

My developer is trying to convince me to move to .net from PHP.
I have always disliked the idea because of the expenses.
But he’s tryiong none the less. I’ve been using WordPress on a number of websites for about a year and
am worried about switching to another platform. I have heard
good things about blogengine.net. Is there a way I can transfer all my wordpress content into it?
Any kind of help would be really appreciated! cheap flights 31muvXS

Responder

Hi there, of course this post is in fact fastidious and I have learned lot of things from
it on the topic of blogging. thanks. 32hvAj4 cheap flights

Responder

I?m impressed, I need to say. Really hardly ever do I come across a blog site that?s both informative and enjoyable, and let me inform you, you have actually struck the nail on the head. Your concept is outstanding; the issue is something that not nearly enough people are talking wisely about. I am really satisfied that I stumbled across this in my search for something relating to this.

Responder

It is not my first time to go to see this web page, i am
visiting this site dailly and obtain pleasant information from here every day.

Responder

Your place is valueble for me. Thanks !?

Responder

BUY CHEAP IBOGAINHow much ibogaine dosage should I take

Responder

Yes! Finally something about keyword1.

Responder

Best view i have ever seen !

Responder

Love watching sunset !

Responder

Love watching sunset !

Responder

Love watching sunset !

Responder

Best view i have ever seen !

Responder

Love watching sunset !

Responder

Oh my benefits! a fantastic article man. Thanks Nevertheless I am experiencing issue with ur rss. Don?t recognize why Incapable to register for it. Is there anybody getting identical rss issue? Anybody that understands kindly react. Thnkx

Responder

ilmaiset videot, ilmaiset pornovideot, ilmaiset porno videot, porno video, porno videot

Responder

fantastic post, very informative. I wonder why the other experts of this sector do not notice this. You must continue your writing. I’m confident, you have a great readers’ base already!

Responder

Hello there! I could have sworn I’ve been to this website before but
after reading through some of the post I realized it’s new to me.

Anyways, I’m definitely glad I found it and I’ll be bookmarking and checking
back often!

Responder

cbd oil

Responder

We are building consultants. We perform roof assessments, window testing, and wall testing for quality assurance on new and existing buildings.

Responder

Oh my benefits! an impressive post man. Thank you Nevertheless I am experiencing problem with ur rss. Don?t recognize why Incapable to subscribe to it. Is there any person obtaining identical rss problem? Any individual that knows kindly respond. Thnkx

Responder

netticasinot, netticasino, casino, kasinot, nettkasinot

Responder

you have a terrific blog here! would certainly you like to make some welcome posts on my blog site?

Responder

you are really a good webmaster. The website loading speed is incredible. It seems that you are doing any unique trick. In addition, The contents are masterpiece. you’ve done a magnificent job on this topic!

Responder

Thanks for the good writeup. It in fact used to be a entertainment account it. Look complicated to far delivered agreeable from you! By the way, how could we communicate?

Responder

There is significantly a bundle to find out about this. I presume you made certain wonderful points in features additionally.

Responder

Someone necessarily lend a hand to make significantly articles I’d state. This is the first time I frequented your web page and so far? I surprised with the research you made to create this particular submit extraordinary. Fantastic job!

Responder

Some truly prize content on this web site , saved to my bookmarks .

Responder

Thanks for your publication on the traveling industry. I would also like to add that if your senior thinking of traveling, it is absolutely imperative that you buy travel cover for elderly people. When traveling, elderly people are at high risk of getting a health emergency. Obtaining the right insurance policy package for the age group can safeguard your health and provide you with peace of mind.

Responder

Thanks for your helpful post. As time passes, I have come to understand that the particular symptoms of mesothelioma cancer are caused by the build up of fluid relating to the lining on the lung and the upper body cavity. The sickness may start inside chest area and spread to other parts of the body. Other symptoms of pleural mesothelioma include weight-loss, severe inhaling and exhaling trouble, vomiting, difficulty taking in food, and inflammation of the neck and face areas. It ought to be noted that some people with the disease don’t experience just about any serious signs or symptoms at all.

Responder

It?s difficult to locate experienced people on this subject, however you sound like you know what you?re talking about! Many thanks

Responder

I used to be more than happy to search out this net-site.I wished to thanks on your time for this wonderful learn!! I definitely enjoying each little little bit of it and I’ve you bookmarked to take a look at new stuff you weblog post.

Responder

Generally I don’t learn post on blogs, but I wish to say that this write-up very forced me to take a look at and do it! Your writing style has been amazed me. Thanks, quite nice article.

Responder

I was looking at some of your posts on this site and I think this internet site is real informative ! Keep on putting up.

Responder

Have you ever considered about including a little bit more than just your articles? I mean, what you say is important and all. But think about if you added some great images or videos to give your posts more, «pop»! Your content is excellent but with images and video clips, this site could undeniably be one of the very best in its field. Awesome blog!

Responder

I?d have to get in touch with you here. Which is not something I normally do! I appreciate reviewing an article that will make people think. Also, thanks for allowing me to comment!

Responder

This is the appropriate blog site for anybody that wishes to discover this topic. You recognize so much its almost hard to suggest with you (not that I really would want?HaHa). You absolutely placed a new spin on a topic thats been written about for many years. Great things, simply excellent!

Responder

Hello there! This is kind of off topic but I need some advice from an established blog. Is it tough to set up your own blog? I’m not very techincal but I can figure things out pretty quick. I’m thinking about creating my own but I’m not sure where to start. Do you have any tips or suggestions? Thanks

Responder

Thank you for sharing excellent informations. Your web-site is very cool. I’m impressed by the details that you have on this web site. It reveals how nicely you understand this subject. Bookmarked this web page, will come back for more articles. You, my friend, ROCK! I found just the info I already searched all over the place and just could not come across. What a great web-site.

Responder

custom admission essay https://customessayjojo.com/ – essay on old custom what is the best custom essay site order custom essay online custom college essay

Responder

essay help pros https://essayhelptopp.com/ – essay help live chat critical essay help write my essay help persuasive essay helper

Responder

Your place is valueble for me. Many thanks !?

Responder

online thesis https://termpaperlow.com/ – writing a thesis paragraph writing a good thesis thesis writing service uk example thesis

Responder

write my paper please https://papersonlinesfy.com/ – paper writers help writing college papers professional college paper writers pay to do paper

Responder

dissertation assistance https://dissertationaas.com/ – phd dissertations best dissertation writing service what is dissertation writing dissertation chapters

Responder

online payday loans for bad credit https://ausapaydayloans.com/ – usa payday loans payday loans online same day deposit online payday loans texas payday installment loans

Responder

essay writing services legal https://essaywritingservicenews.com/ – essay service cheap custom essay writing service reviews admission essay services essay writing services us

Responder

cat essay writer https://essaywriterdodo.com/ – professional grad school essay writers expert essay writers automatic essay writer professional grad school essay writers

Responder

I am not certain the place you’re getting your info, but good topic. I needs to spend some time studying more or understanding more. Thank you for wonderful info I was on the lookout for this information for my mission.

Responder

Would you be fascinated in trading links?

Responder

essay custom https://essayonlinehdb.com/ – looking for someone to write my essay write my essay discount code cheap essay buy essay writing website reviews

Responder

help with writing college essays https://essaywriterslop.com/ – college admission essay writing service essay help chat room cheapest essay writing services help with writing college essays

Responder

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

Responder

data analysis coursework https://courseworkhelpvra.com/ – cpa coursework buy coursework online online coursework coursework writers

Responder

instant payday loans https://sapaydayiloans.com/ – payday loans online no credit check best online payday loans what are payday loans most trusted payday loans online

Responder

Your location is valueble for me. Thanks !?

Responder

I like what you guys are up also. Such smart work and reporting! Keep up the excellent works guys I have incorporated you guys to my blogroll. I think it will improve the value of my site :).

Responder

I haven’t checked in here for some time because I thought it was getting boring, but the last several posts are good quality so I guess I’ll add you back to my daily bloglist. You deserve it my friend 🙂

Responder

liquid tadalafil http://50cialmen.com/ – tadalafil citrate purchase cialis cheap cialis cialis 5mg

Responder

I’ve been absent for some time, but now I remember why I used to love this blog. Thanks , I will try and check back more often. How frequently you update your site?

Responder

cheap viagra pills http://60lmentop.com/ – viagra suppliers viagra india viagra online without prescription cheap generic viagra

Responder

Hiya, I’m really glad I have found this information. Nowadays bloggers publish only about gossips and net and this is really frustrating. A good site with interesting content, this is what I need. Thank you for keeping this site, I’ll be visiting it. Do you do newsletters? Can’t find it.

Responder

tadalafil best price http://aazmencial.com/ – tadalafil liquid discount cialis cialis 5mg buy cialis without prescription

Responder

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

Responder

You can definitely see your skills in the work you write. The world hopes for even more passionate writers like you who are not afraid to say how they believe. Always go after your heart.

Responder

I blog frequently and I seriously appreciate your information. This article has really peaked my interest. I’m going to bookmark your site and keep checking for new information about once per week. I subscribed to your RSS feed as well.

Responder

you might have a terrific weblog here! would you like to make some invite posts on my weblog?

Responder

I blog frequently and I seriously thank you for your content. The article has truly peaked my interest. I am going to bookmark your blog and keep checking for new information about once a week. I opted in for your Feed too.

Responder