Questions tagged [macros]

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 [vba] tag instead of this one if the question concerns a Microsoft Office product. This helps the people answering, filter questions more efficiently.

Filter by
Sorted by
Tagged with
-1
votes
0answers
45 views

If Value Match Do the function/Not Match with Entire Column Value then Goto next Line in VBA

I have problem in using VBA "If" Command list of category 1. Numbers 2. Text Here I want to Process Each Sub Macro if the Number category match with Column Value Do the Process or else Category ...
0
votes
0answers
19 views

How to differentiate between selected pictures in VBA code excel?

I am a total beginner in VBA coding. I try to arrange 3 pictures in Excel as follows: Bring all selected pictures to the same size. Bring the 3 selected pictures 188 point away from each other in 1 ...
0
votes
0answers
32 views

How to create & run a macro in Outlook's Word editor

I like to do a couple things to pictures when I paste them in an email using current O365 version of Outlook: I put a border around it, set a basic drop shadow, and indent it by 1 tab stop. I'm trying ...
2
votes
2answers
46 views

How to Add Suffix to range of cells with existing Data

Input: 55958 55959 55960 55961 55962 55963 60346 60347 60348 60349 Output: 55958-K 55959-K 55960-K 55961-K 55962-K 55963-K 60346-K 60347-K 60348-K 60349-K I ...
0
votes
0answers
5 views

Playing Macros in Testpad that you saved using a shortcut

So I have a TextPad Macro I saved. This macro goes through the file and finds certain data items. This macro is saved specifically to play once. The reason it is saved to play once is I need to ...
0
votes
1answer
15 views

Macro line that will remove formula when copying row input

could an expert please show me how to prevent formulas in "Daily Report" from being carried over? Specifically, there is a formula in E2, and I only want the data carried over, not the formula. Thanks!...
0
votes
0answers
23 views

Converting All Plain Text Links to Hyperlinks II

I have an Excel workbook that we input data into. once complete I run a macro that performs a mailmerge and some formatting of the text including changing plain text link addresses to blue/underline. ...
0
votes
0answers
21 views

Autorefresh of RSS in excel in background (not focusing excel)

So I found this already describing how to autorefresh data in excel from RSS Auto-Refresh RSS Feed in Excel but such solution makes the excel to focus itself whenever the macro is run. I know that ...
2
votes
1answer
63 views

Why is my Excel macro running so slowly?

My VBA code in excel is running very slowly. How could I make this macro code to run faster? Sub Test() Dim i As Long For i = 1 To Rows.Count Statusupdate = Cells(i, 1).Value If Status = "Started" ...
1
vote
1answer
39 views

Excel Macro - Hide and Unhide based on cell value

I want to set up for Excel Macro to automatically hide/unhide entire row based on the values in Column D. e.g. If the value in D3 = 0, then hide If the value in D4 = 1, then unhide Only variables ...
0
votes
0answers
45 views

Extract external links from multiples Excel files

I'm trying to get all the external links from multiple Excel files and I already found a way to do this with a macro, but this only works for a single file. Right now I have a list of all the Excel ...
0
votes
0answers
16 views

Maximize an excel file in Macro scheduler

I run a script with Macro Scheduler but opening the excel file minimizes it, does not maximize it, it does not occupy the entire screen. //Set IGNORESPACES to 1 to force script interpreter to ignore ...
0
votes
1answer
36 views

Copy and paste a row of data into separate rows and staggered columns using Excel VBA macro

I am trying to automate the following step. From a single row of Excel data, I would like to copy and paste each cell value into separate rows, but staggered by columns, as shown in the picture. Is ...
0
votes
0answers
15 views

Outlook To Prompt Sender to Select Subject Line Tag

We email many clients each day. We are asked to quote the client's unique customer number in each email but often staff forget. When sending emails, is it possible to have outlook prompt users/senders ...
0
votes
0answers
33 views

Executing SQL query through VBA

I am new here, but I always check this website whenever I have issues with excel and so far you've always helped me! Now I have a problem with VBA: I want to "call" an SQL query through a macro, so ...
0
votes
1answer
79 views

Excel Macro Help: Start at R 2, read Col B, WS 1, find same in Col E, WS 2, then copy cell in Col I, WS 1 into cell of Col G, WS 2

Need to make a Macro in excel to do this: Starting at Row 2, read Column B, Worksheet 1,(need to Prefix data with PW- and trim spaces at end of string) find same value in Column E, Worksheet 2, ...
0
votes
0answers
20 views

Intercepting mouse software calls to usb mouse

I'm running win10 x64. I have a Pictek PC231A gaming mouse, which comes with macro buttons and a software to map buttons to keys/macros (among other things). I want to preface this by saying that I ...
0
votes
0answers
23 views

Print certain columns using VBA Form

I have data from column "A:DO" and would like to set up a userform so user can select which column they want to extract data from and be able to print/PDF. Is this possible? Please advise. Thanks
2
votes
1answer
52 views

Two-way connection between multiple cells and across multiple worksheets

I am looking to make a 2-way connection across 2 worksheets so that I only have to change the entry on one sheet for it to be changed on the other and vice versa. I found a good explanation here (I ...
-1
votes
1answer
35 views

Force “File Save As” immediately after workbook opens — code not executing

I created a .xlsm wrkbk template with the code below (h/t mrexcel.com) embedded in a module in the macro-enabled template file. To prevent users from overwriting the template file, the macro should ...
0
votes
0answers
35 views

VBA Macro Loop Until Blank Cells

I have a sheet with large data where I need to cut specific columns and paste in 1 column and have made a macro but need to loop it until it finds a blank cell. This is my code ' ' Column Macro ' ' ...
0
votes
1answer
84 views

How to map CTRL + ALT + TAB to a macro activated from a customizable special key on the Microsoft Natural Ergonomic Keyboard 4000?

I am trying to create a, what I call, 'Task Switcher' macro, ideally using the useless for me 'Media Play/Pause' button on my 'Microsoft Natural Ergonomic 4000' keyboard. I have no need for the ...
1
vote
1answer
24 views

Finding spaces OR commas with wildcard search

I'm writing some macros that will automate frequent cleanup/text formatting tasks in the bibliographies I edit. For background, these bibliographies often contain citations for chapters from edited ...
0
votes
1answer
41 views

calculate related cells if value changes in any of the related cells

I have a column with 5 cells that are related by formula: A1=A2+A3+A4+A5 A2=A1-A3-A4-A5 A3=a1-a2-a4-a5 a4=a1-a2-a3-a5 a5=a1-a2-a3-a4 I need a macro that will automatically calculate all cells A1:...
0
votes
0answers
105 views

From 1 module call macros from 2 separate modules

I have 3 separate modules embedded in the same active workbook (i.e. not in personal.xlsb). From the module named Run_DelCols_Del_NoComms, I want to call in consecutive order the macros from these 2 ...
0
votes
0answers
22 views

Excel Macros - Hiding Rows in a Table Based on Content

Long time reader, first-time poster (corny, I know) I created a tab that contains a single large table, which pulls data in from other tabs in the workbook. Oftentimes many rows of this table do not ...
0
votes
1answer
26 views

Word Macro: Move line of text above previous line

I am trying to use the following code to move a line of text that begins with "File #" above the previous line of text, but I get a bad parameter error on the Selection.Range.Move object. For Each ...
1
vote
2answers
67 views

Excel VBA, define range with a variable that has it's value gathered from a cell

This is my code: Dim var As string var = Range("B1").Value Range("").Interior.ColorIndex = 5 Is it possible to define the last line like this in some way, and if so, how?: Range("var").interior....
0
votes
0answers
15 views

Button: save value of cell to a different cell each time?

I have a form with checkboxes, and a button. When a user checks the checkmarks, I generate a value (from 1 to 50). When they click the button, I want it to save that value to a different cell and ...
0
votes
1answer
58 views

VBA: Union function not working to delete non-contiguous columns

Using the UNION function, the code below should delete the entire column for specified cols B, D & F. I choose UNION function because several SE posts suggested UNION FUNCTION as most efficient ...
0
votes
0answers
35 views

How can I summarize debit and credit in Excel like the following picture?

I have input data like this : I want the output like this : How can be like that? in the output image, credits have been summarize by date and placed at the end of the date. Thanks..
0
votes
0answers
83 views

VBA: Error with specifying Range or UsedRange with AutoFilter

Code below should delete entire rows based on the condition that cells in BOTH Col C AND D in a given row are empty). The macro uses a filter to display only those rows meeting the aforementioned ...
1
vote
0answers
34 views

Binding a macro to a function key (Adjusting volume in Spotify)

What I want: By pressing one of the function keys (F3) on my keyboard I want a program to start up, that switches to an open but not active window, executes a keyboard shortcut in this application (...
1
vote
1answer
58 views

Excel Macro not going in the order it's supposed to

I have written a macro which is supposed to run an add-in on each worksheet. The Add-in is a Sage specific Add-in. I'm sure the sendkeys should work with whatever sendkeys I put in? However, it runs ...
0
votes
0answers
29 views

Need help working with automator applescripts in Numbers on MacOS catalina

I am working with numbers sheet and I want to create a keyboard shortcut so that when I press a button the script searches for the number "1" in column I, when it finds the number "1" it will increase ...
1
vote
0answers
31 views

Excel: Random select within table that meets with a condition

My issue is the following: I have a list of references, addresses of the reference and the city of the reference (the sample is shared below). My table has roughly 7000 lines, the references are ...
1
vote
1answer
62 views

How can I split one Excel Worksheet into multiple files based on date column?

I need to split a worksheet with 10,000 rows into multiple Excel files based on the dates in column D. The file has 9 columns (A:I). Dates on column D are currently formatted as DD/MM/YYYY. I only ...
1
vote
1answer
60 views

Excel: 2-way linkage for cells in separate workbooks

I am brand new, and not sure if I'm asking this correctly. I have an excel spreadsheet that I want to share with a client so we can both edit and update its information. However, I only want to share ...
0
votes
1answer
144 views

Macro to print/save pdf won't point to specified default directory

In a previous post, SE'er harrymc suggested this line to my code so that the user is allowed to name the file but the directory save path is fixed. strfile = "C:\mypath\Selection_" & Format(Now(),...
0
votes
0answers
26 views

Excel: 2-way linkage for cells between separate workbooks

I have the code to make a 2-way link between worksheets, (thanks Christofer Weber it works great) however, I need to do the same thing, but between two separate Excel workbooks. I realize it will ...
0
votes
0answers
29 views

Excel-VBA that fills a template based on a table and saves them as individual sheets

Looking to have an Excel-VBA that fills a "Template" sheet based on a row/table's info and save as individual sheets. Worksheet "DataSource" layout is Columns A-AB (headers in row1) The goal is that ...
0
votes
0answers
26 views

Excel Keeps Not Responding After Macro

I have a very large spreadsheet that we use as a tracker for document control. Currently we are trying to figure out if a drawing is checked out to someone or now when a new request comes in. ...
0
votes
1answer
52 views

Excel VBA - Copy & Paste macro loop pastes each file over the last

I have a question regarding a macro that's not performing in the way expected. I took a script I found online to cycle through a number of files in the same directory and perform the same action on ...
0
votes
2answers
73 views

Finding Specific Duplicate Text/Strings in Two Different Cells

I had a quick question regarding how I might find exact duplicate text/strings using a formula or macro. Here are two of my columns for example: With those columns in mind, I would like to have a ...
0
votes
1answer
49 views

Change default save directory when macro prints to pdf

Given a pre-selected print area, the following macro by Ryan Wells prints to pdf and then points the user to name&save the pdf file into the XLSTART directory on local machine. Please help me ...
0
votes
1answer
20 views

two plots per slide at same location with same size on many slides

I want to place two pictures per slide one left one of the right side. This pattern would be repeated over many slides with different figures representing same quantities for different scenarios. ...
1
vote
0answers
44 views

VBA sort based on two different columns and then filter out by values/color

I am trying to run a macro that a) sorts numerically by column E and G b) and then sorts by column O a) I want to keep the first 2 rowa there all the time, and it has the headers in row 3 The ...
0
votes
1answer
57 views

create a macro in excel using find and replace

I want to find whatever is in cell A1, and replace it with whatever is in cell B1, and then do the same with A2 to B2, A3 to B3, etc. I don't know what to tell the "find" and "replace" functions to ...
0
votes
0answers
30 views

PERSONAL.XLSB and many workbooks

I have problem to move trough many workbooks using VBA. I want to use Workbooks(i).Activate but i have problem with that. Every day i export 4 different workbooks. Every day they have different names. ...
0
votes
1answer
76 views

LibreOffice Writer: How to rapidly set some text to SMALL CAPS?

In LibreOffice Writer, whenever I need to transform some text to SMALL CAPS, I go through these steps: Select the excerpt that I need in Small Caps; Right-click on it and choose Character > ...

1
2 3 4 5
30