3 Tips for Writing Formulas with VBA Macros in Excel

  Рет қаралды 208,057

Excel Campus - Jon

Excel Campus - Jon

Күн бұрын

Sign up for our Excel webinar, times added weekly: www.excelcampus.com/blueprint...
In this video I share 3 tips for writing and creating Excel formulas with VBA macros.
Download the file: www.excelcampus.com/vba/writi...
You will learn:
1. How to use the Formula property of a range object to insert a formula into a cell. The formula is text that begins with the equals = sign and is wrapped in quotation marks.
2. How to use the macro recorder to create the VBA code for more complex formulas that contain special characters.
3. What R1C1 style formula notation is and how it works. R1C1 allows us to create relative references to cells (rows & columns), instead of hard coding cell addresses like A1. R1C1 can be used for both absolute and relative references, and also mixed references (absolute row & relative column).
Register for my free upcoming webinar on getting started with macros & VBA: www.excelcampus.com/yt-vba-we...
Related videos:
2 Critical VBA Assumptions: • 2 Critical Excel VBA A...
Free webinar on learning macros & VBA: • Free Webinar on VBA Ma...
00:00 Introduction
00:11 3 Tips for Writing Formulas with VBA Macros in Excel
00:35 The Formula Property
01:09 Use the Macro Recorder

Пікірлер: 54
@kickilicoff
@kickilicoff Жыл бұрын
I have been searching around internet the whole day, and this video explains it all! Thank you!
@sim7717
@sim7717 6 жыл бұрын
You are really the gem of a guy when it comes to describe things concerning excel or vba. Thanks a trillion for this video.
@BOWENSblog
@BOWENSblog 3 жыл бұрын
learning how to do some VBA is actually a good way to climb the corporate ladder in non-technology roles. Thanks for coaching people online and supporting productive talent. Technology is getting better these days. Good thing VBA will never be replaced in the next 20 years. It can assist in administrative work, repetitive work, improve critical thinking skills(like academic, and application) and saves time
@divinorodriguesdasilva5048
@divinorodriguesdasilva5048 Жыл бұрын
Excellent video!
@Bebicsek
@Bebicsek 4 жыл бұрын
This video with the R1C1 formula setting just saved my night :-) Thanks!
@jlpayne052710
@jlpayne052710 3 жыл бұрын
Jon, I really appreciate your videos they are amazing. Too many times I find that excel videos are all just veiled sales pitches. I also appreciate that they are easy to follow and not too fast Thanks
@OttawaRocks
@OttawaRocks 4 жыл бұрын
Excellent video. I was absolutely hunting for a formula creator within a VBA environment and this does the trick!
@Revlemmon
@Revlemmon 4 жыл бұрын
Thank you for this video, it was a godsend!! I have huge formulas that I needed to write with VBA and had no idea how to do it until I watched this video.
@Juanksv09
@Juanksv09 5 жыл бұрын
Excellent, clear explanations and pristine video and audio. Thanks!
@randomCADstuff
@randomCADstuff 3 жыл бұрын
The last time was exactly what I was looking for and very well explained! Thank-you!!
@augustodemelo915
@augustodemelo915 3 жыл бұрын
Excellent!!! It is exactly what I was looking for!!! Thank you so much!!!
@suavesergio
@suavesergio 3 жыл бұрын
Thank you John, for sharing this kind of tips with us. They´re very useful!
@mobr.
@mobr. 6 жыл бұрын
Very clear and informative video. Thank you.
@olibolivar7223
@olibolivar7223 4 жыл бұрын
Just what I needed.Thank you sir! :D
@rajeevdixit7019
@rajeevdixit7019 3 жыл бұрын
You are amazing tracher of vba
@stuartmuscroft3753
@stuartmuscroft3753 3 жыл бұрын
wow...GENIOUS!!! I am truly grateful, thank you
@jgojiz
@jgojiz 6 жыл бұрын
Amazing explanation many thanks!
@gokul8370
@gokul8370 2 жыл бұрын
SO GOOD! Helped me lot! Thumbs up and Subbed as well.
@smrenterprises589
@smrenterprises589 2 жыл бұрын
Thanks a lot . It's perfect
@irynamusiiovska828
@irynamusiiovska828 6 жыл бұрын
Thanks for your video.
@ChollyMc
@ChollyMc Жыл бұрын
Well done! Thank you!!!
@ExcelCampus
@ExcelCampus Жыл бұрын
You're welcome, Charles! 😀
@dottied5596
@dottied5596 3 жыл бұрын
This helped so much! Thank u!!
@abhi2k68
@abhi2k68 5 жыл бұрын
At 1:11 I made up my mind that I will Like & download this video!
@strosa2406
@strosa2406 3 жыл бұрын
too useful .. thanks jon
@Pankaj-Verma-
@Pankaj-Verma- 4 жыл бұрын
Thanks for the kind help.
@jgg518
@jgg518 4 жыл бұрын
Very Helpful Video
@kopobinang6928
@kopobinang6928 2 жыл бұрын
Thank You!
@sasavienne
@sasavienne 5 жыл бұрын
Nice. Thanks...
@fundip43
@fundip43 2 жыл бұрын
I was trying over and over to find a re-record function of marcos . Specially when I don’t know how to write formulas in excel well let alone vba. so to use a second writing macro to record the steps to copy into a macros vba is really straight forward .
@hoggrobinson
@hoggrobinson 6 жыл бұрын
beauriful
@shavkatpulatov5203
@shavkatpulatov5203 2 жыл бұрын
it was great! full desription to clear, thanks a lot, but I'd like also to kwon how to replace the "spread sheetname " with variables thanks in advance
@debbie6085
@debbie6085 5 жыл бұрын
Hi Jon, Thank you for another one of your great videos. I've just tried to sign up to the 7 Steps to Getting Started with Macros and VBA, but when I entered the time zone of Perth Australia, it prompted for a date but didn't allow one to be entered. Can you please help me with this as I'm keen to view the video? Thank you.
@avb6programminguser776
@avb6programminguser776 5 жыл бұрын
Good for VBA programming and VB6 programming
@paultc16
@paultc16 3 жыл бұрын
Nice Video
@magibis7519
@magibis7519 6 жыл бұрын
this is really wonderful video. i have question. everyday data are not same how to do vlookup in vba dynamically.
@kumarrohit8538
@kumarrohit8538 4 жыл бұрын
Superb
@samsammito168
@samsammito168 5 жыл бұрын
Hi Jon, I'm trying to use variables with the formula property can you share an example?
@FRANKWHITE1996
@FRANKWHITE1996 6 жыл бұрын
thx
@nadermounir8228
@nadermounir8228 3 жыл бұрын
Thank you John for the VBA tips. I wonder how to write a formula using VBA where a sheet name is used and this sheet can change at anytime. So say Range("A1").Formula = "='Product DataBase'!D2". Product database is the sheet name but what if someone changes the sheet name? How can this be made dynamic ? Any idea ?
@microsecure2612
@microsecure2612 5 жыл бұрын
thank you very much for this video very helpful .... i have a question please: 1- i have this formula: =IF(Sheet1!$B$15=Sheet4!B8,Sheet1!$B$14,"£0.00") and it works fine with your video tutorial but the cell does not show the sign (£) 2- how to tell Macro to move to the next cell with the same formula Many thanks
@mithiladas2481
@mithiladas2481 5 жыл бұрын
my sheet1 B10 value is 298263 after adding formula"=sum(B4:B9)" i want to add a formula in B10 with existing value "298263" Example: Range("B10").Formula = "=SUM(B4:B9)+298263" Every time this formula change the existing value which is exist in B10 Cell. How can i do that?
@frankcornfield5915
@frankcornfield5915 2 жыл бұрын
Does anyone know how to insert a formula into a vertical range? As the example from above with the range B10 to B30
@PhilipHubbe
@PhilipHubbe 2 жыл бұрын
Hey Jon, I am trying to insert a formula that is giving me a compile error. (expected end of statement) formula = "=CONCATENATE( "BILL OF MATERIAL:" , Mid(CELL( "Filename", A1), Find( "]", CELL( "Filename", A1)) + 1, 255))" Any Ideas?
@TheArifbmc
@TheArifbmc 4 ай бұрын
my formula is only to find cell position using match formula. then i can use it to define where i will paste a value from B7 to H* Range("B7").Select Application.CutCopyMode = False Selection.Copy cell= .formula = "=MATCH(A7;$G:$G;0)" Range("H" & cell).Select ActiveSheet.Paste but this not working. please advise
@flying_horse
@flying_horse 3 жыл бұрын
Hi , I am trying to write a formula that uses a range ( it's a countif formula ) Thing is I don't want to define the range myself . But even if I have it defined by a variable set as a range , it wont work Any tips ?
@abdulsafwan711
@abdulsafwan711 4 жыл бұрын
How can I hide the formula and show only values
@Dopeboyz789
@Dopeboyz789 5 жыл бұрын
What if i dont wanna see the formula
@prashant_karna
@prashant_karna Жыл бұрын
Activecell.formular1c1="=sum(a18:r[-1]c)" Sir please check what is wrong with this formula
@masonharper4610
@masonharper4610 2 жыл бұрын
Excel adds "@" in front of the formula and it does not work. A different version of excel?
@ElGordoFreeman
@ElGordoFreeman 4 жыл бұрын
There is a third condition of the formula property, the formula name must be in English with commas as list separators. If you have a spanish Excel and you want to use the local name, SUMA instead of SUM, you have to use the FormulaLocal property. Obviously, if you want a more versatil code, use the Formula property.
5 Excel Secrets You'll Be Embarrassed You Didn't Know
17:32
Excel Campus - Jon
Рет қаралды 102 М.
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 69 МЛН
Looks realistic #tiktok
00:22
Анастасия Тарасова
Рет қаралды 99 МЛН
Жайдарман | Туған күн 2024 | Алматы
2:22:55
Jaidarman OFFICIAL / JCI
Рет қаралды 1,8 МЛН
6 Excel Tools Most Users Never Think to Use (Files Included)
12:34
MyOnlineTrainingHub
Рет қаралды 121 М.
EASILY Make an Automated Data Entry Form in Excel
14:52
Kenji Explains
Рет қаралды 385 М.
How to Create & Use Excel Macros (Real world example)
10:09
Leila Gharani
Рет қаралды 1,6 МЛН
Convert MS Excel Formula to VBA code
5:39
Dinesh Kumar Takyar
Рет қаралды 88 М.
Learn Macros in 7 Minutes (Microsoft Excel)
7:40
Cody Baldwin
Рет қаралды 1,8 МЛН
How to Use Arrays Instead of Ranges in Excel VBA
10:20
Excel Macro Mastery
Рет қаралды 196 М.
Excel Macro VBA Tip 9 - Enter Formulas in Excel with a Macro
6:39
Python in Excel vs. VBA - What You Should Learn in 2024!
10:05
David Langer
Рет қаралды 33 М.
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 69 МЛН