Recording macro using find next - issue not recording

bogbot

New Member
Joined
May 4, 2020
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
Hello everyone.

I would be really grateful for some help.

I have been teaching some basic macros to others. In one macro it is necessary to search through a list of 6 names. To take advantage of the record macro function in excel, i use the 'find' function from the icon ribbon.

This records the following (ranges edited after):

Range("forecastdata").Select
Selection.Copy
Range("schemecell").Select
Selection.Find(What:=Range("analysed_scheme").Text, After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 7).Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Is the ability for excel to record this function impacted by anything. I have a query from some one recently saying it would not record for them. They sent me their file and, sure enough, on their file the macro would not record this code. Yet as soon as I saved as and reopened the file on my PC, i was able to record the code on my own computer. What could be causing this?

I am aware they are ways to record this macro, however i need this to be simple as possible for my learners and everyone use the same method.

Could it be an old version of excel, or a settling i am unaware of?

correct code example recorded (and slightly edited afterwards) on my PC

Range("forecastdata").Select
Selection.Copy
Range("schemecell").Select
Selection.Find(What:=Range("analysed_scheme").Text, After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 7).Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

code recorded by learner using the same steps (lots of code line do not record like mine):

Range("J13:K13").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("P10").Select

Thanks.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top