Excel VBA is not recording macro properly

0 votes
I ran across some issues while recording a macro in Excel. Although I followed numerous YouTube lessons, I was still unable to effectively record and execute macros. Here's an illustration: I should get something like this in the VBA editor when I record the action of choosing one interval: Range("C3:E7"). The range can be found in the VBA editor instead of Select ("C3:E7"). DataFields, which when executed obviously doesn't function.

The same thing happens when I attempt to record the process of calculating an average from an interval; the result is some weird code, like Bold. = "=AVERAGE(R[-2]C[-1]:R[1]C[-1])"

What do I lack? Is there anything I missed?
Nov 15, 2022 in Others by Kithuzzz
• 38,000 points
1,389 views

1 answer to this question.

0 votes
The "awkward code" is an R1C1 notation formula. This is the simplest method for writing relative formulas in VBA.

The macro recorder is not a tool that is faultless. When a macro is played back after being recorded, many things that worked perfectly while it was being recorded would not work. Additionally, there are some activities that the macro recorder completely misses. In certain circumstances, you must manually fix the code in accordance with the VBA documentation.

There isn't enough information in your code sample regarding the Range Select to tell what went wrong. Troubleshooting won't be possible without access to your data and details about your precise steps.
answered Nov 15, 2022 by narikkadan
• 63,600 points

Related Questions In Others

0 votes
0 answers

Creating an Instagram bot with reading an excel file and posing on Instagram, but some of words can not be read properly

from instabot import Bot import openpyxl import smtplib bot = ...READ MORE

Sep 26, 2022 in Others by Kithuzzz
• 38,000 points
847 views
0 votes
1 answer

Excel VBA Rnd Not Actually Random

 Initialize the random number function. Sub test() Dim number ...READ MORE

answered Oct 27, 2022 in Others by narikkadan
• 63,600 points
646 views
0 votes
0 answers

Why is Excel not calculating the cube root as the cube root?

I think Excel treats exponents with recurring ...READ MORE

Nov 2, 2022 in Others by Kithuzzz
• 38,000 points
353 views
0 votes
1 answer

Excel Ribbon Macro not enabled

If you place a breakpoint in one ...READ MORE

answered Nov 11, 2022 in Others by narikkadan
• 63,600 points
776 views
0 votes
1 answer

Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

answered Sep 5, 2018 in Blockchain by digger
• 26,740 points
1,260 views
0 votes
1 answer

How to load file to Excel Power query from SFTP site

Currently, I don't think there is a ...READ MORE

answered Dec 3, 2018 in Power BI by Upasana
• 8,620 points
3,697 views
0 votes
1 answer

Using VBA Excel to create a gramatically correct list

The Excel AND function is a logical ...READ MORE

answered Feb 9, 2022 in Others by gaurav
• 23,260 points
975 views
0 votes
2 answers

How to copy a formula horizontally within a table using Excel VBA?

Hi so basically, create an adjacent column ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,690 points
1,090 views
0 votes
1 answer

Excel-VBA - How to identify Target range (more than 1 cell) is deleted in a Worksheet_Change function?

You misunderstand the purpose of the function ...READ MORE

answered Sep 23, 2022 in Others by narikkadan
• 63,600 points
3,762 views
0 votes
1 answer

Excel VLOOKUP where the key is not in the first column

INDEX/MATCH will do it in any direction of ...READ MORE

answered Oct 20, 2022 in Others by narikkadan
• 63,600 points
1,507 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP