More Group Sites
Education Books
School Rankings
Jobless Net
Better Home
Welcome Guest! To enable all features please Login or Register.



Go to last post Go to first unread
#1 Posted : Saturday, 18 February 2017 8:59:28 AM(UTC)

Rank: Administration


Groups: AcademicCoachingSchool, admin, Administration, BookSeller, CatholicSchool, CoachingAdult, CoachingProfessional, CoachingSports, ExtraCurriculumCoaching, IndependentSchool, Moderator, MusicTeacher, PrivateSchool, PublicSchool, SelectiveSchool, tutor
Joined: 23/11/2008(UTC)
Posts: 523

Store VBA scripts or macros in Personal.xlsb for use in any Excel workbooks

1. Click Record a macro, give a name, choose Store macro in personal Macro Workbook;
2. Stop macro recording
3. Click Visual Basic or Enter Alt+F11 to open Visual basic Editor. If project explorer is hidden, unhide it from View menu;
4. Find and Edit the script or macro in Personal.xlsb in the project explorer and save it;
5. Drag the module from Personal.xlsb to your workbook project in project explorer. Now you can use the script in your workbook.

An example of script:
Flip Contents in an Excel cell (Text or a Number)
Public Function FlipStr(myRange As Range)
  FlipStr = StrReverse(myRange.text)
End Function

1. If your numerics end in zeros like 123400 the 00 will be dropped if you use the =FlipStr(cellRef)*1, which forces it back to numeric.
2. To keep the zeros you must change them to text per the =FlipStr(cellRef).

If you just want to use the module for your current workbook
1. To create a General Module, hit ALT + F11 to open the Visual Basic Editor.
2. Hit CRTL + R to open Project Explorer.
3. Find your workbook/project and select it.
4. Right-click and Insert>Module. Paste the above code in there. Save the workbook and hit ALT + Q to return to your workbook.

How to Reverse Contents in an Excel cell (Text or a Number)

How to flip Excel columns

Edited by user Saturday, 18 February 2017 12:52:55 PM(UTC)  | Reason: Not specified

Rss Feed  Atom Feed
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.