A macro in computer science is a rule or pattern that specifies how a certain input sequence should be mapped to a certain output sequence according to defined rules and procedures. **Consider using [tag:vba] tag instead of this one if the question concerns a Microsoft Office product. This helps ...

learn more… | top users | synonyms (1)

-1
votes
1answer
67 views

How Can I Comment a Block of Text in Microsoft Office Visual Basic Editor?

Sometimes when I'm writing a macro in Excel's Visual Basic Editor (VBE), I want to comment out a block of code to test the macro without it. I know I could go to each line and type an apostrophe ('), ...
1
vote
1answer
1k views

How to create a macro in Outlook 2010 to add the the date to the subject line

I am new to the VBA format of writing code and I have been researching how to get the current date to AUTO input into the Subject line of an email when commanded. I need to know how to complete the ...
-1
votes
2answers
42 views

Is there a way i can copy this macro i made but have it change for the next tickbox

I have made this macro to Select cell A3 copy the value and paste it into cell Y3. it then clears cell A3 as that's a dropdown box, by doing this the dropdown option can be now selected in A4. ...
0
votes
1answer
102 views

Macro to create a text file with values from cells and text

Im trying to create a macro in excel that creates a text file which some of the parameters are on excel cells. The output would be for example: The kid is 'cell (1,1)' old. His name is 'cell ...
0
votes
1answer
61 views

Doskey Variable Expansion

I'm thinking the answer to this question is no, but it shouldn't be. From the command prompt normally, the following (as an example): C:\> FOR %I IN (*) DO ECHO %~xI would give me the ...
0
votes
0answers
31 views

Excel 2013 Split One sheet into separate books

I have one sheet called Invoiced Jobs report containing the information for 10 invoices the invoice number is in Column X can I make a macro to split each invoice into a separate workbook?
1
vote
0answers
69 views

How can I open a PDF to a certain page from within excel?

I would like a macro code for Excel 2013 that will open up a certain page upon clicking a button in the excel cell. I am using the below code, but it is working intermittently. Please help with a ...
1
vote
2answers
41 views

Mapped keyboard shortcuts that generate text responses (macros maybe)

I've got a seemingly simple idea where I would press a combination of keys (like Ctrl + Alt + Z) and paste a previously written(and saved) response on wherever I'm typing. This is meant to work in a ...
-1
votes
2answers
1k views

Use Excel VBA If value in column a is not in column b then add value to column c

Dim i As Variant 'For i = 1 To 5 For Each i In rngWatch Dim c As Variant c = rngWatch.Cells(i, 1).Value If i <> rngReconcile.Cells(i, 1).Value Then MsgBox i ...
0
votes
1answer
47 views

Creating a macro with .sh

so I would like to write a script that will be used in the following way. ./MakeMacro 1 The basic form of the script looks like this: #!/bin/sh ...
-2
votes
1answer
48 views

What formula can I use to colouring in columns?

I am creating a planning spreadsheet for the operators to use on the shop floor. Products have a specific time in which they are made. All I want to do is, when I type a product name into ANY cell, ...
0
votes
0answers
180 views

Mac Excel 2011 xlsm file will not open

I really hope someone might be able to help. I have just saved my research data base as a macro-enabled file. The screen went grey and hence I closed the app. On reopening, the file can be seen, and ...
1
vote
0answers
224 views

Macro to copy multiple rows from one worksheet to another and then copy the headings into copied columns

I am new to macros and I have developed this macro that allows me to take rows that has data in them from cells B-G from Workseet "master 1" starting from row 11. I take this data and then copy it ...
0
votes
1answer
1k views

Macro: Insert a new row above a cell containing a value

I have a column containing the following values: A1 = 0 A2 = 1 A3 = 3 A4 = 4 A5 = 0 A6 = 1 I wish to select column A and insert a new column above any instance of 0. I have tried the following code ...
0
votes
2answers
86 views

How to add commonly used (non-signature) phrase in emails?

I have a text line with a hyperlink that I would like to readily use in composing emails. It is not a signature, so it doesn’t fit there. How can I build a macro that would allow me to add this text ...
1
vote
0answers
22 views

How to select a cell relative to a button with a macro?

I am trying to create a macro in Excel which I can assign to a number of buttons (one in each row), each of which will operate on the data in the row in which the button is located. Is it possible to ...
1
vote
0answers
325 views

Reset Numbered List with Text Style VBA macro MS Word

I'm trying to make a VBA macro to create a Word document from Excel... Currently I'm having issues with setting up the Lists properly. I want the list indexes linked to my 2 header types. Like so: ...
0
votes
0answers
106 views

Find and replace multiple values within selected cells using another workbook

I was wondering whether anyone could point out what's wrong with the VBA code below. It's based on the following: Find and replace multiple values within selected cells I want it to take the find ...
1
vote
3answers
455 views

Can you change linked charts to embedded charts in PowerPoint 2010? Or use relative links to Excel files?

I need to replicate a PowerPoint presentation across multiple countries then send the presentations to colleagues and give them the ability to edit charts. To do this I have created an Excel file ...
0
votes
0answers
171 views

vba excel macro runtime error 1004

Dim lastC As Long lastC = wb2.Worksheets(2).Cells(1, Columns.Count).End(xlToLeft).Column 'highlighted in debug SourceRange.Copy wb2.Worksheets(2).Cells(1, lastC + 1).PasteSpecial Paste:=xlPasteValues, ...
0
votes
1answer
213 views

modify Excel macro to reference list of text rather than hard code

I’m trying to get some help with the last step of an Excel Macro I’ve been working on. I’ve set up a Macro that will take data from sheets from two different workbooks, and paste them into a third ...
0
votes
0answers
85 views

Excel VBA macro - i need to insert column and add a default value to all the cells in that column

I have created a macro but i could not insert columns in it and i could not add values to that coulmn. I want to insert a column and the default value to that entire column should be CH. column ...
0
votes
0answers
39 views

Libre Office Calc - how to suppress search results window when performing a macro search?

I work with a macro that finds and replaces certain characters in a spreadsheet. I use this macro a lot and I don't need the "search results" window to pop up after every search since I am not ...
0
votes
1answer
55 views

Spreadsheet data checking columns

I am trying to separate datas from columns(A,B&C) based on datas from an index table at columns (E&F) I need to list only those data from columns A/B/C when column B data has no corresponding ...
0
votes
0answers
49 views

Word macros to resize a picture to its original size and then back to “thumbnail” size

Workflow: 1. Insert a larger picture in a MS Word 2010 document 2. Reduce the picture size to a smaller "thumbnail" size 3. Save and close the document 4. Reopen the document 5. Select the picture ...
0
votes
2answers
43 views

How can I perform search & replace in a text file based on conditions?

I have a large text file (.bib) with lots of double entries for some fields. Essentially, the file is a .bib-file (more info here) which has roughly 1000 entries. The content is structured like this: ...
1
vote
1answer
91 views

Defining math shortcuts/macros for Microsoft Word

Is it possible, in any version of Microsoft Word, to define shortcuts for recurring mathematical expressions? (preferably in a way that allows updating all occurences at once if needed) For instance, ...
0
votes
1answer
46 views

Running a set of data through multiple calculations and outputting the results back on the data sheet

Using Microsoft Excel 2013. I am creating a calculation sheet for quickly evaluating the metrics of rental properties. I have a sheet called CALCULATIONS with several calculations, and several ...
0
votes
0answers
59 views

Copy-pasting between two computers , or a virtual machine and host?

In my work, I find myself hopping between a VPN machine and my host machine to do work. Lately I've been using https://www.cl1p.net/ a lot , for copy-pasting between 2 computers. A nice site, ...
0
votes
1answer
183 views

Excel 2010 Formula: Finding a dynamic column based on string value, then count # of “0's” within that column

I have tried looking at many different potential avenues at solving this; INDEX, MATCH, DCOUNT, HLOOKUP with INDEX & MATCH, COUNTIF with INDEX & MATCH. What I'm looking for is a way to set the ...
0
votes
0answers
67 views

Excel Macro for preserving line breaks in cell text

I have an excel sheet containing text that I require copying and then pasting into a 3rd party application (bit like notepad). I need to use a button to copy the text so it cannot be edited or ...
0
votes
1answer
336 views

Keyboard Shortcut to Run Macro in Excel for Mac

Basically the title says it all. In the editor in Excel on Windows, all you have to do to run a macro is press F5. What is the keyboard shortcut to do this on a Mac?
1
vote
1answer
163 views

AutoHotkey, don't get the solution

I really need your help. I trying to program an AutoHotkey script but I not quite getting a working solution. My current AutoHotkey script is: #IfWinActive Guild Wars 2 shift & 1:: Send, 1 sleep ...
0
votes
1answer
230 views

How to Run macro in excel instance “2” from excel instance “1”

Lets say i have already opened Workbook 1 in Excel instance 1 and Workbook 2 in excel instance 2 And i have macro called "AAA" in instance 1 and "ASD" in instance 2 i want to call "ASD" in instance 2 ...
0
votes
0answers
219 views

Select item from drop down menu and run macro

I have a drop down list in a sheet called 'Report', cell B9. The source for this list is in another sheet in the same workbook, 'List' with range 'A1:A32'. When the different items in this list are ...
0
votes
0answers
218 views

Prevent 'Run-time error '7' out of memory' error in Excel when using macro

I keep getting this error whenever I run a macro in my excel file. Is there any way I can prevent this? My code is below. Debugging highlights the following line as the issue: ...
1
vote
1answer
415 views

Excel: How to extract group of the same rows and their values into columns?

How can I extract the second table from the first one? I need to extract those titles that have exactly three costs (in the following example: f1 and f3). I tried using pivot tables but could not ...
1
vote
0answers
234 views

run-time error 1004 Application Defined or object-define error

I have this macro that I wrote: Dim lastColumn As Long lastColumns = wkbWorkbook2.Worksheets(2).Cells(1, Columns.Count).End(xlToLeft).Column 'this is the highlighted part in debug SourceRange.Copy ...
0
votes
1answer
66 views

Autohotkey - How to overwrite an existing hotkey, while remapping the original hotkey

I want to do a seemingly simple action but I'm having trouble figuring out how. I want to remap Ctrl+F -- which natively opens a 'find' window in the program I'm using -- but I want to create a new ...
1
vote
1answer
40 views

How to change superscript text so that it is displayed in parenthesis in Word?

How to change superscript text so that it is displayed in parenthesis in Word? I have a massive amount of interlinear text in the format: x y where y is the translation of the word x. I would like ...
0
votes
1answer
330 views

Use an user defined function for data validation

I created a named range which is the result of a user definer function. Let say my rage is named List and has three items, if I select three cells and enter =List and press Ctrl+Shift+Enter, I get ...
-2
votes
1answer
57 views

sum the values in a column and add the sum to the filename of a workbook

Hello I have been able to create new worksheets based on unique values in a column. In addition to this, i want to sum up the values in a column and include this sum in the filename of each ...
1
vote
0answers
114 views

Deploy macros and ribbon button - Outlook 2010

We need to deploy macros across our organization, along with a shortcut button up on the ribbon, in Outlook 2010. Right now, the way we're slated to do this is by copying over and overwriting the ...
0
votes
1answer
96 views

Excel Macro: Setting Character Range to Bold garbles text

What I want to do is the following: I have around ~1400 rows full of data, of which the last column contains a lot of text. Here's an image to show what I mean: image removed because I can only post 2 ...
1
vote
1answer
271 views

Transferring custom excel ribbons in local computer to other computers in Excel 2010

I have created certain Macros. By customizing the ribbon ,i converted the Macros into buttons. I saved the file as an add-in (.xlam). Now, when i send the file to other people, I shall tell them to ...
1
vote
1answer
201 views

How do I debug Excel / OpenOffice / LibreOffice macros - getting started

How do I get started with debugging VBA macros? This is to help to locate faults and mistakes within the code and the data it handles.
3
votes
1answer
56 views

Emacs - move cursor back after mark-whole-buffer & indent-region

I'm Emacs newbie and for automatic re-formating of my source codes in Emacs I've created simple macro using mark-whole-buffer and indent-region commands, mapped to C-j shortcut: (fset ...
0
votes
1answer
289 views

Merging multiple excel files in to one file

This is my macro for merging all the files in one directory to one excel sheet. I am unable to find why its not working as per expectation. I have thousand rows in each file. It copies 1000 rows from ...
-2
votes
1answer
43 views

how to run four macros by click one button?

i have four groups of shapes. And each group got 6 shapes, and i would like to random choose one of 6 shapes in each group. And because i got four groups, which means every time i click a button, 4 ...
-1
votes
1answer
56 views

Execute an Excel 2010 Add-In

An excel add-in seems to be the easiest way to share a macro I created with my team. I saved the workbook as a .xlam file and installed the add-in so it shows up under the addins button with a ...