No video

Excel VBA: Referring to Ranges & Writing to Cells (Range, Cells, Offset, Names)

  Рет қаралды 351,938

Leila Gharani

Leila Gharani

Күн бұрын

Пікірлер: 262
@LeilaGharani
@LeilaGharani 7 ай бұрын
Get access to the full Excel VBA course here 👉 www.xelplus.com/course/excel-vba-excel-macros/
@TheDutchGemini
@TheDutchGemini 3 жыл бұрын
VBA allows to specify ranges using the short notation with square brackets instead of the Range() or Cells() property. For instance 'Range("A1").Value' can be written in short as '[A1].Value'. This is also true when using areas, for instance [A2:C2].Value = "2nd", and named ranges such at [LastOne].Value = "10th".
@Yolande26
@Yolande26 4 жыл бұрын
Leila has the best Excel tutorials/videos by far! I did two of her courses and she is simply the best instructor!
@LeilaGharani
@LeilaGharani 4 жыл бұрын
Wow, thank you!
@rnunez047
@rnunez047 2 жыл бұрын
In Spanish-language there's not channel like this one. Great, you have a nice voice, even my native language is Spanish, i get all you explain. I just founded you. Congratulations "Desde américa Latina, Nicaragua. Saludos"
@LeilaGharani
@LeilaGharani 2 жыл бұрын
Thank you! 😃
@aricosman5354
@aricosman5354 3 жыл бұрын
GOD bless you Mrs Leila, Thanks a lot for your tutorials
@mariarib6504
@mariarib6504 Жыл бұрын
omg. I'm not getting much sleep. I keep learning more from you and instead of fixing the basic stuff I have written, I am thinking of other things I can do! Thank you :-)
@mehdihammadi6145
@mehdihammadi6145 6 жыл бұрын
I am one of those who believe that there is always something to learn. And this has just been verified once again. Although I have been writing VBA code for years, I have never used the shortcut "?" in the immediate window because I used to write the entire debug.print command. So thank you very much Leila for this
@LeilaGharani
@LeilaGharani 6 жыл бұрын
Hi Mehdi. I'm glad you found something new here. Actually I was also not aware of the "?" method for the longest time after I started to use VBA. It made me very happy when I discovered it :)
@mehdihammadi6145
@mehdihammadi6145 6 жыл бұрын
Hi Leila, for the history this is an old (legacy) command coming from old versions of Basic. If my memory is good I used it with gwbasic for more then 25 years ago :)
@LeilaGharani
@LeilaGharani 6 жыл бұрын
Thanks for the info :)
@chandrasekharboya8885
@chandrasekharboya8885 4 жыл бұрын
Hi Leila, Really really impressive explanation of cell referencing. This is the best video explaining the cell references. Thank you.
@PremKumar-pq5lr
@PremKumar-pq5lr 3 жыл бұрын
Used this techniq and solved a issue for which i am looking for a solution in long time. Keep rocking😎👏✌
@rag7628
@rag7628 5 жыл бұрын
Hello Leila, I've been working now through some of your great tutorials here and now I really have to make you a big compliment. Thanks sooooo much for the great work you a doing here, it's really a great performance. Your tutorials are very well structured and very easy to understand and extremely helpful. Thank You :-)
@ismailismaili0071
@ismailismaili0071 6 жыл бұрын
I think I started to understand VBA with you thank you so much Ms. Leila
@lawrenceward2366
@lawrenceward2366 5 жыл бұрын
New to VBA. Most useful video I have seen. Thank you.
@LeilaGharani
@LeilaGharani 5 жыл бұрын
I'm very happy to hear that Lawrence. Glad you like the video.
@davecks3042
@davecks3042 4 жыл бұрын
I did enroll in Udemy in Leila VBA course and I learned immensely. Thanks
@teachmeteachme9014
@teachmeteachme9014 3 жыл бұрын
You're creative, so I've decided to outdo you in this field. تحية لك من المغرب
@AamirSaeedTajalli
@AamirSaeedTajalli 5 жыл бұрын
Lady Leila, I LOVE YOU for making this wonderful tutorial. Excellent TEACHER.. knowing the art of MAKING UNDERSTAND. Thanks a lot.
@LeilaGharani
@LeilaGharani 5 жыл бұрын
I'm very happy to hear this Aamir! Glad you like the videos.
@AamirSaeedTajalli
@AamirSaeedTajalli 5 жыл бұрын
@@LeilaGharani i started watching your tutorials 3 days back and the more i am diving in, the more i am learning "FAST" and more i am liking your WAY of teaching. Full of confidence, command, knowledge and patience. GREAT WORK and inspiring achievements. Getting convinced to join your online tutorials paid version. I hope they will be even better.
@dasrotrad
@dasrotrad 6 жыл бұрын
This is really great Leila. Love your presentation and excellent explanations. It is very well thought out. You make it easy to understand. When Mike Girvin is following your videos, you know you are among the great. Thank you so much for sharing.
@lilanthawijerathne3085
@lilanthawijerathne3085 3 жыл бұрын
Hats off to Leila ! . I learns lot from your videos.
@LeilaGharani
@LeilaGharani 3 жыл бұрын
Glad to hear that
@sasavienne
@sasavienne 5 жыл бұрын
Cells.Columns.Autofit is lovely. Leila gets 🌟 🌟 🌟 🌟 🌟
@LuisGarcia-mn4jg
@LuisGarcia-mn4jg 3 жыл бұрын
You explain concepts very well and it is easy to follow. Thanks
@LeilaGharani
@LeilaGharani 3 жыл бұрын
Glad you think so!
@abdallah.kandiel
@abdallah.kandiel 6 жыл бұрын
Thankd leila Back to our happy day Waiting for the end to learn about the course Good luck ur highness
@LeilaGharani
@LeilaGharani 6 жыл бұрын
You're welcome. It's happy Thursday :) Wish you a great rest of the day.
@MyChannel706
@MyChannel706 3 ай бұрын
Excellent video and narration! Thank you!
@scorpio19771111
@scorpio19771111 2 жыл бұрын
Excellent video. You are great instructor, and the video is top-notch in clarity.
@ca.lakshminarayanreddyjamb9087
@ca.lakshminarayanreddyjamb9087 5 жыл бұрын
I like the way you explain. Really awesome!!! Thankyou.
@alwysrite
@alwysrite 11 ай бұрын
was looking for multiple range syntax and found it here after looking on various sites. Thank you
@j.fabricioelias227
@j.fabricioelias227 6 ай бұрын
Thank you! This video gave me an excellent explanation about cells and ranges referencing.
@LeilaGharani
@LeilaGharani 6 ай бұрын
Glad it was helpful!
@abumalik97
@abumalik97 3 жыл бұрын
impressive teaching ability , right pace and right details . subscribed !.
@LeilaGharani
@LeilaGharani 3 жыл бұрын
Much appreciated!
@steamsteam6607
@steamsteam6607 4 жыл бұрын
Such a smart, beautiful woman. Iran makes great things. Thank you for these videos.
@steamsteam6607
@steamsteam6607 4 жыл бұрын
@Elegant Fowl Pls
@mobr.
@mobr. 5 жыл бұрын
Clear, concise, and informative. Thank you.
@ckokse
@ckokse 6 жыл бұрын
Thursday is my favorite day! I was already wating for your new video. This is great, will practice this as you instructed. I want to be prepared for when the VBA course finally comes out.
@LeilaGharani
@LeilaGharani 6 жыл бұрын
Mine too! Great. Practice is always good :))
@arielponce8586
@arielponce8586 3 жыл бұрын
You are an awesome teacher.
@cobusoosthuizen5223
@cobusoosthuizen5223 6 жыл бұрын
Thanks Leila, nice preparation for the upcoming course
@LeilaGharani
@LeilaGharani 6 жыл бұрын
You're welcome Cobus & thank you.
@SugarKane9547
@SugarKane9547 2 ай бұрын
Thanks Leila, You just cleared up a lot of confusion I had about vba range referencing. I am very grateful......and YES, I like what I see but someone already subscribed before me! :)
@LeilaGharani
@LeilaGharani 2 ай бұрын
Glad it was helpful!
@konqueror07
@konqueror07 4 жыл бұрын
Awesome video. I think this should be the first video to watch for any one beginning to learn macros like me. I've spent hours trying to figure out how to refer cells in different scenarios. Can you also mention how to refer to variable ranges? Eg Range from A1 to Ai where "i" is a result of another formula or loop counter etc. Thanks for making a video on this topic though.
@YogeshSharma-ui7xx
@YogeshSharma-ui7xx 3 жыл бұрын
Leila you r awesome and nicely explains with smile and simple way. Thank u
@ah244895
@ah244895 5 жыл бұрын
Very clear, understandable. Great way to learn Excel m
@LeilaGharani
@LeilaGharani 5 жыл бұрын
I'm glad to hear that.
@sanjaykulkarni1800
@sanjaykulkarni1800 6 жыл бұрын
Excellent way of explaining.. Thanks.
@joecampanini8154
@joecampanini8154 3 жыл бұрын
Outstanding presentation. Thank you.
@pponcho8245
@pponcho8245 2 жыл бұрын
Thank you for teaching the basics!!!!
@joem112
@joem112 6 жыл бұрын
Very good video. I liked the way you did the drag and drop with the named range...pretty cool way to do that.
@LeilaGharani
@LeilaGharani 6 жыл бұрын
Glad you like that :)
@marioalfredooviedo
@marioalfredooviedo 4 жыл бұрын
buenos principios excel, tienes un gran poder de enseñar, hay personas que creen que solo se debe enseñar lo mas astral, pero los principios de excel son excelentes, te felicito
@LeilaGharani
@LeilaGharani 4 жыл бұрын
Thank you Mario. Glad you like the video.
@MrWofty
@MrWofty 4 жыл бұрын
Oh Wow, solved my problem in a few easy minutes, well explained. I wish my school teachers, College Tutors etc, were like this. Thanks for giving me some enjoyment with learning :) I used this in Excel VBA "A1", "A" & lRow, Where lRow was the last row number. Cheers :)
@LeilaGharani
@LeilaGharani 4 жыл бұрын
Glad it helped!
@andydidyouhear
@andydidyouhear 2 жыл бұрын
Great lecture, easy to follow.
@SanjayKumar-yx6gc
@SanjayKumar-yx6gc 6 жыл бұрын
Very useful lecturer Leila , Thank you so much.
@LeilaGharani
@LeilaGharani 6 жыл бұрын
You're very welcome Sanjay.
@Mario112352
@Mario112352 2 жыл бұрын
Very nice presentation Look forward to your course
@cekhattaq
@cekhattaq 3 жыл бұрын
Explanation is in very nice & systemic way, Thanks
@LeilaGharani
@LeilaGharani 3 жыл бұрын
Thanks and welcome
@umeshthadhani6388
@umeshthadhani6388 4 жыл бұрын
So Clear Explanation....!!! Makes understanding simple.! :) thank you So Much !! :)
@LeilaGharani
@LeilaGharani 4 жыл бұрын
You are welcome!
@MrYegneswaran
@MrYegneswaran 5 жыл бұрын
Very much insightful.. No need to refer to any other material as far as Range object though VBA..👍👍👍
@aliz3700
@aliz3700 2 жыл бұрын
بهترین استادی👏👏👏
@sarwansingh9423
@sarwansingh9423 4 жыл бұрын
This was very helpful
@sasavienne
@sasavienne 5 жыл бұрын
Brilliant. I like your videos Leila. Thanks a million.
@LeilaGharani
@LeilaGharani 5 жыл бұрын
Thank you! I’m glad to hear that.
@stevennye2441
@stevennye2441 3 жыл бұрын
excellent review!
@1gopalakrishnarao
@1gopalakrishnarao 6 жыл бұрын
Thanks a lot Madam, very inspiring, illuminating, impressive, inquisitive & revealing, . Explanation is superb, very articulate. On behalf of all my Excel learner friends A BIG SALUTE TO MY BELOVED BEAUTIFUL TEACHER.
@LeilaGharani
@LeilaGharani 6 жыл бұрын
Thank you very much Gopala for the kind words and for your support. I am glad you're enjoying the VBA series so far :)
@helenasvensson6595
@helenasvensson6595 10 ай бұрын
So well explained, as always!
@ringsfieldvillagehallvilla7970
@ringsfieldvillagehallvilla7970 4 жыл бұрын
This is fantastic. I will be taking the course at some point in the future.
@LeilaGharani
@LeilaGharani 4 жыл бұрын
Great! I hope you'll like it.
@abdullahalklbani7454
@abdullahalklbani7454 2 жыл бұрын
Amazing 👏 that was full comparhansive explanation 👏 I appreciate that efforts from your side This is was very helpful
@LeilaGharani
@LeilaGharani 2 жыл бұрын
My pleasure 😊
@irfanmansoori3060
@irfanmansoori3060 3 жыл бұрын
Unbeatable knowledge Leila.. thanks..
@jokkiossaka3306
@jokkiossaka3306 5 жыл бұрын
Thank You Leila for your time and cool video !
@LeilaGharani
@LeilaGharani 5 жыл бұрын
My pleasure Jossi. Glad you like the video.
@yoryopower2908
@yoryopower2908 3 жыл бұрын
Thank you.
@BOWENSblog
@BOWENSblog 4 жыл бұрын
This is a good hobby
@alanrobbo6980
@alanrobbo6980 3 күн бұрын
Fantastic, Thanks.
@Vicky-bl9pr
@Vicky-bl9pr 3 жыл бұрын
You are the best😊😊👌👌👌
@SolomonKinyanjui_sk
@SolomonKinyanjui_sk 6 жыл бұрын
Hello Leila the lesson to day was very clear. Keep it up.
@LeilaGharani
@LeilaGharani 6 жыл бұрын
Thank you Solomon. Will do my best :)
@sindhusudhakaran1731
@sindhusudhakaran1731 3 жыл бұрын
so well explained. Thank you
@excelisfun
@excelisfun 6 жыл бұрын
Awesome VBA Referencing video!!!! Quote Happy Fun : )
@antrikshsharma6990
@antrikshsharma6990 6 жыл бұрын
ExcelIsFun You should learn VBA as well😁
@excelisfun
@excelisfun 6 жыл бұрын
Yes but where could I find a good class!?!?! ; )
@LeilaGharani
@LeilaGharani 6 жыл бұрын
Thanks Mike - yes...... not easy to find a good class ;)) In the past week I've been locked up working on finalizing the course. I haven't had a chance to watch your videos, but I've added them all to my list. Have some catching up to do once I get out of here...
@antrikshsharma6990
@antrikshsharma6990 6 жыл бұрын
ExcelIsFun Try Wise Owl on youtube👍🏻
@excelisfun
@excelisfun 6 жыл бұрын
Thank you for reaching out to me!!! But I am sorry, antiksh... I was making a joke... I already know about Wise Owl. I feature the Wise Owl channel and Leila's channel at the excelisfun Channel home page : ) I was making a joke that I should take Leila's class. But really it is no joke - she is so amazing at teaching and marketing and making videos : ) Go Amazing Online Excel Team, including you antiksh!!!
@nour-eddineoumakhlouf5296
@nour-eddineoumakhlouf5296 3 жыл бұрын
Great job, Leila!
@LeilaGharani
@LeilaGharani 3 жыл бұрын
Thank you! 😄
@sarasamin
@sarasamin 5 жыл бұрын
Superb! Excellent!Thank YOU!
@LeilaGharani
@LeilaGharani 5 жыл бұрын
You are very welcome!
@MohAboAbdo
@MohAboAbdo 4 жыл бұрын
Thank You So Mutch.
@thirdfabe167
@thirdfabe167 5 жыл бұрын
really awesome,,i acquired a lot of knowledge in your video.
@djibysadji9634
@djibysadji9634 5 жыл бұрын
So clear Leila! Thank you!
@Galileo2pi
@Galileo2pi 3 жыл бұрын
She is the best
@RaymondJerome
@RaymondJerome 5 жыл бұрын
thanks, the many ways of getting ranges as part of a row or column is very helpful. all this is similar in openOffice too but they appear to use : and , differently and to also use ;. in VBA i never access activesheet or activerange or selection, I actually pass a range or ranges to the code as in the following which i really have no error checking. Function rms(ByVal Target As Range) As Double 'root mean squared. quadratic mean Dim Cell As Range Dim summand As Double Dim tot As Integer tot = 0 summand = 0# For Each Cell In Target.Cells If IsNumeric(Cell) Then tot = tot + 1 summand = summand + Cell ^ 2 End If Next Cell rms = Math.Sqr(summand / tot) End Function
@RaymondJerome
@RaymondJerome 5 жыл бұрын
i also use parallel ranges, either rows or columns 1 wide, but have to not use for each
@mohieddinedadi317
@mohieddinedadi317 3 жыл бұрын
thank you ; its useful
@technentertain
@technentertain 4 жыл бұрын
mam i want to enter ony10 numbers in 12 cells in a row. 11th number could not be entered. please help me
@johnborg5419
@johnborg5419 6 жыл бұрын
Thanks Leila. Very Interesting. Some practice and will wait for the next one :)
@LeilaGharani
@LeilaGharani 6 жыл бұрын
You're welcome John. Agree - practice is always good :)
@cananpasa5623
@cananpasa5623 3 жыл бұрын
Thanks a lot💕💕💕💕💕
@isa.rahban2132
@isa.rahban2132 3 жыл бұрын
thank you very much
@abhilashc2965
@abhilashc2965 4 жыл бұрын
You are Divine. Demi God of Excel
@alanliu1313
@alanliu1313 5 жыл бұрын
Very clear and useful!
@shoaibahmedsagar
@shoaibahmedsagar 6 жыл бұрын
Thanks a lot Leila.
@anilpanda5840
@anilpanda5840 5 жыл бұрын
Thanks a lot, very clear!
@khalidalisubhanallah2947
@khalidalisubhanallah2947 6 жыл бұрын
Bundle of Thanks Mam Nice Video
@LeilaGharani
@LeilaGharani 6 жыл бұрын
You're very welcome Khalid. Thank you for your support.
@jorge56149
@jorge56149 4 жыл бұрын
Thanks!
@satishpatel6530
@satishpatel6530 4 жыл бұрын
Nice video
@moisestatis5418
@moisestatis5418 Жыл бұрын
I like how you teach. In fact, I'm enrolled in your Power Query Course. I'd assumed that you also have a Excel VBA course right? I'd like to learn macros.
@nancyd.5990
@nancyd.5990 5 жыл бұрын
U r the best
@AamirSaeedTajalli
@AamirSaeedTajalli 5 жыл бұрын
Very true
@Donnie64inPa
@Donnie64inPa 2 жыл бұрын
Just figured out my error: I named my module Cells which started this whole mess! (I left my question for anyone else's benefit)>>>>Thanks for the work you put into this video Leila, quick question: When I tried to use your second example: cells(1,1)="1st" it gave me an error: Compile error: Expected variable or procedure, not module. It's like vba isnt recognizing that expression because it's not even suggesting anything when I type the "cells(" part....... Thanks for any help.
@johnkoay8097
@johnkoay8097 2 жыл бұрын
you are good.
@shameemnassiree2780
@shameemnassiree2780 6 жыл бұрын
Thanks ma'am 😊 your videos are quite helpful
@LeilaGharani
@LeilaGharani 6 жыл бұрын
You're welcome Sami. Glad to hear that :)
@shameemnassiree2780
@shameemnassiree2780 6 жыл бұрын
Leila Gharani Ma'am do u have videos on data validation, concatenation ?
@maryspurplelife2024
@maryspurplelife2024 5 жыл бұрын
Useful video, Thanks
@tariquejameel9068
@tariquejameel9068 3 жыл бұрын
Can you make video on cutting length optimisation
@lpanades
@lpanades 4 жыл бұрын
Thanks
@donserpico8244
@donserpico8244 Жыл бұрын
Hey Leila, thanks for your videos. I need to loop through a range (one column) and 1) check if the cell contains a specific text/string and 2) if true, write the text in a new cell (same row). Which of your tutorials do you recommend to watch? Also, I didn't find the next video/lecture you mentioned at the end of this one. thank you in advance
@souzamotasacul
@souzamotasacul Жыл бұрын
Tomorrow, if I remember, I’ll write the code here for you 🤜🏼🤛🏼
@khalidalisawi8037
@khalidalisawi8037 Жыл бұрын
you are great, really it interesting video
@LeilaGharani
@LeilaGharani Жыл бұрын
Thank you! 😃
@khalidalisawi8037
@khalidalisawi8037 Жыл бұрын
@@LeilaGharani
@khalidalisawi8037
@khalidalisawi8037 Жыл бұрын
@@LeilaGharani dear I follow most your videos really it was very interesting and my level is progressing but can you guide me to advanced book in vba
@mohitdhanwani5540
@mohitdhanwani5540 6 жыл бұрын
Thanks for the video ma'am.
@LeilaGharani
@LeilaGharani 6 жыл бұрын
You're very welcome Mohit.
@21121990jay
@21121990jay 4 жыл бұрын
Hi @Leila , how would you select two ranges and select them together ? E.g. Header should be fixed Range (First Range) and second range would be from active cell range.
@DakshaNY
@DakshaNY 4 жыл бұрын
its good really
@annpurnakumari7218
@annpurnakumari7218 5 жыл бұрын
Really awesome. Thanks.
@robertakwasiadjei8223
@robertakwasiadjei8223 6 жыл бұрын
Thanks Leila for such a wonderful video. However, when is the course coming on?
@LeilaGharani
@LeilaGharani 6 жыл бұрын
You're welcome Robert --- should be live next week :)
@AliHasan-lr4xj
@AliHasan-lr4xj 5 жыл бұрын
Very informative , but I have a request if you can show us how to merge cells than contains same value with option for Excel user to select the cells range as an input on dailog box Thanks
@fareedbadar8793
@fareedbadar8793 6 жыл бұрын
Thank you, for sharing useful information. Please can you advise how you open excel and vbe at the same time?
@LeilaGharani
@LeilaGharani 6 жыл бұрын
I snap the VBE window in place. You can use the shortcut key window and then right arrow. Or you can drag the VBE window with your mouse and then drag it to the right hand side until it snaps in.
@fareedbadar8793
@fareedbadar8793 6 жыл бұрын
I will try Thank you
5 Things I wish I knew When I started using Excel VBA
12:45
Excel Macro Mastery
Рет қаралды 337 М.
Just Give me my Money!
00:18
GL Show Russian
Рет қаралды 950 М.
GTA 5 vs GTA San Andreas Doctors🥼🚑
00:57
Xzit Thamer
Рет қаралды 24 МЛН
Glow Stick Secret Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 18 МЛН
Angry Sigma Dog 🤣🤣 Aayush #momson #memes #funny #comedy
00:16
ASquare Crew
Рет қаралды 46 МЛН
Excel LAMBDA - HOW & WHEN you Should use it
16:02
Leila Gharani
Рет қаралды 436 М.
SECRET Excel Named Range Shortcuts to Save Time
12:28
MyOnlineTrainingHub
Рет қаралды 46 М.
Excel VBA Beginner Tutorial
2:10:31
Learnit Training
Рет қаралды 5 МЛН
How to get the Last Row in VBA(The Right Way!)
15:41
Excel Macro Mastery
Рет қаралды 157 М.
How to Create & Use Excel Macros (Real world example)
10:09
Leila Gharani
Рет қаралды 1,7 МЛН
You Won't Believe These Crazy PIVOT TABLE Hacks!
11:30
Leila Gharani
Рет қаралды 693 М.
Just Give me my Money!
00:18
GL Show Russian
Рет қаралды 950 М.