Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
73 views

I want my macro to find all words (in a certain unformatted document) that start with a certain string ("yyy") give these words a different formatting

I want to find all words (in a certain unformatted document) that start with a certain string ("yyy") and give these words a different formatting. The following VBA-code executes once and ...
Bert van der Saag's user avatar
2 votes
1 answer
178 views

Incrementing number in a row each time I print

I need to increment a value by 1 in K1 each time I print sheet number 1, 2, etc. I used to have code that was saved and was working fine, but I lost it when I formatted the PC. It used to ask me the ...
Shiv's user avatar
  • 33
0 votes
0 answers
30 views

Assigning Excel add-in macros to ribbon using a relative path

I am trying to create a basic Excel GUI for a Python software which uses Excel spreadsheets as inputs. I have managed to create a basic add-in with a macro which runs the Python code for me. To make ...
Sorade's user avatar
  • 101
0 votes
1 answer
231 views

Removing Content Control Quick Part in Microsoft Word

I have a VBA macro that will auto populate a document with content control quick parts that have blocks of text with other content controls within them. I'm attempting to write a VBA macro that will ...
churchizactiive's user avatar
0 votes
0 answers
33 views

Mentions affecting Regex Validation

I was wondering if anyone came across the issue with Regex validation in Microsoft Outlook when including mentions (i.e.,@Tony or @Jodie). The below code works fine when there is no mentions in the ...
churchizactiive's user avatar
0 votes
0 answers
18 views

Inserting Today's Date In A Cell If Other Cell Values Are Changed or Added using VBA

So I have this spreadsheet that I share with my Team, and I'm looking for a way to have a Today's date put in a cell, everytime there's a change in the worksheet. I found this coding, which is working,...
Marta Hoffmann's user avatar
1 vote
0 answers
188 views

How to run a Word macro from the command line?

I'm trying to save and close all open Word files (to start I only target one of them). The macro I made works when ran from Word (clicking "Execute"), but it won't run when called from the ...
TryingToLearn's user avatar
1 vote
1 answer
438 views

Macro for using Goal Seek over a range of cells

I'm trying to automate the GoalSeek function over a range of cells. Each cell in Columns I and J calculates a quantity of interest using two different methods, and the results must agree. Each cell in ...
Alan's user avatar
  • 11
5 votes
1 answer
579 views

Making it so users that do not have macros enabled cannot see other sheets

I am working on a project that wants all users to have macros enabled. It is a shared sheet so I cannot simply hide everything as a baseline and unhide the sheets when Open_Workbook is ran. My goal is ...
Thomas Wohllaib's user avatar
0 votes
2 answers
186 views

Excel macro to split the date and time in one column to two separate columns

The code created by the macro works just fine, but looks clumsy. Can anyone assist in cleaning this up so that I can learn to make the recorded macros cleaner going forward? Sub SplitDateTime() ' ' ...
Iron Man's user avatar
  • 103
2 votes
1 answer
50 views

Separately color all rows for unique clients listed in one column

I am a relative Excel noob, and to that end, forget about Excel macros. I'm here because this seems to be where the GOATs congregate, and I really need some help. I have an enormous data set that ...
alm's user avatar
  • 23
0 votes
2 answers
671 views

How to handle protected view errors in Excel VBA macro

Introduction. I have a local website, and one of its pages is used for downloading an Excel report by several users on their PCs. The file is automatically generated with some data from our database ...
Garry Gorn's user avatar
0 votes
2 answers
354 views

How to add a keyboard shortcut for a macro in excel

I want to add a custom keyboard shortcut for a Macro (to zoom in and out) in MS Excel. It works very well with Word thanks to this answer, but on Excel (at least with Version 2310 that I'm running) ...
ludicrous's user avatar
0 votes
0 answers
418 views

How to get live data from a website in Excel

I want to get the price of an item from AliExpress in Excel. For example, this item. I modified the URL to get the specific product variant using this. I found this to get the name and price of the ...
John Doe's user avatar
  • 107
0 votes
0 answers
87 views

How do I automatically generate colour styles in LibreOffice Calc using VBA?

I want to be able to run a macro to automatically create a set of named styles that change the cell background colour. I tried this, but it doesn't work: REM ***** BASIC ***** Sub ...
skeetastax's user avatar
0 votes
0 answers
37 views

Looking for common solution to validate Excel reports (ETL)

I'm trying to more efficiently validate financial reports generated in Excel. Currently, a user generates around 300 reports in Excel using different Sheets in each. These reports use extensive ...
Iqbal's user avatar
  • 1
0 votes
0 answers
332 views

How to wait for Web Query to complete in Excel VBA Macro

I have an Excel file that uses an API to lookup some data from a website. It is built using the standard "Get Data from Web" built in PowerQuery feature of Excel. I run a macro to update ...
techtheatre's user avatar
0 votes
0 answers
34 views

Copying a specific range of cells form multiple worksheets in a work book to a Summary Sheet

I have data on 28-31 different worksheets based on the month. the data is goes from B23 to J33. I need to copy and paste those cells from each tab to a Summary tab.
Kevin Trippel's user avatar
0 votes
0 answers
126 views

Excel macro requests access to an external file: removing dependencies

I download an Excel file and I copied the sheets (I tried also to maintain only the main sheet; figure below) and the macro in a new Excel file; when I try to execute the macro, this message appears: ...
Gennaro Arguzzi's user avatar
0 votes
1 answer
970 views

Word macro: Insert text into each selected cell of a table

I am trying to format cells and insert text (in this case a checkbox) in each SELECTED cell in a table. This is used as a place keeping aid in my plant emergency procedures. The cells format properly, ...
Rokbottoms's user avatar
0 votes
0 answers
73 views

Copy range of row using two dropdown list as start time and end time in Excel

I have list of data that fetched from SQL at defined time range: At that image I also already make dropdown list named Start time and End time. The question is: how can I make a macro that the output ...
Romy Prazhad's user avatar
0 votes
1 answer
91 views

LibreOffice Impress macro is only half functional when used in presentation as opposed to outside

I made an .odp file that contains two slides. In Slide 1, there is a single circle that when clicked on moves to Slide 2. This circle uses a simple interaction and no macro. In Slide 2, there is a ...
wc80399's user avatar
0 votes
1 answer
156 views

Is it possible to restrict a VBA macro command to just one workbook?

I have macros added as commands to a specific workbook. But a new workbook will show the commands, and if I click it, it just opens the previous workbook. I would rather them not be there in new ...
J.P.'s user avatar
  • 5
0 votes
2 answers
34 views

Excel: is there a formula/code I can use to paste specific values based on a dropdown value?

I’m a new user looking for help on an Excel formula/macro code. To demonstrate my scenario, let’s say I have a drop down list with values of “Breakfast, Lunch, and Dinner”. If the user selects ...
190191cd's user avatar
0 votes
1 answer
1k views

How to deselect / select specific AutoFilter options consecutively using VBA?

I'm trying to create a macro which will allow me to deselect / select specific Filter options, consecutively. So in the below example, if I click "Deselect Type 1", then "Type 1" ...
Philayyy's user avatar
  • 129
0 votes
1 answer
170 views

Excel for Microsoft 365: Change Width of Columns Based on Column Name in Header Row

I am using Excel for Microsoft 365. On the first worksheet, I have recorded a macro to adjust column widths and row heights. I then switched to the second worksheet and ran this macro and realized I ...
Dave's user avatar
  • 1,029
1 vote
1 answer
98 views

Need a VBA Solution - Clear contents of 7 cells to the right of cell

I have a document where I need to look for a specific text and clear all text in the cells to the right of it. I don't want to delete the cells just clear them out. There are a total of 7 cells next ...
Rey's user avatar
  • 13
0 votes
1 answer
348 views

My macros is disabled when I open a Word document via VBA in Access?

I have made a special template for the Word documents I create via VBA in Access - the problem is that the macros in that template are disabled ! If I create a new document by clicking the template ...
ksor's user avatar
  • 1
0 votes
0 answers
147 views

VBA vlookup in another sheet [duplicate]

I have two Sheets (Sheet1 & Sheet2). Sheet2 has list of headers with numbers either as 1 or 3 in adjacent cells. Sheet 1 has same headers with values as "TRUE" or "FALSE" from ...
Rax's user avatar
  • 5
0 votes
1 answer
151 views

VBA if and vlookup on multiple columns

I have two tables (Table1 & Table2). Table1 has values as TRUE or FALSE. Last cell is the desired output. I want that if all values in Table1 are FALSE, my Output column should write 0. If any ...
Rax's user avatar
  • 5
0 votes
2 answers
2k views

VBA to copy value and loop for each row

I have range of columns with mostly blank cells. I am trying to copy if any of those cells contain a text. For this I have written the following code which works fine for the first row. How to repeat ...
Rax's user avatar
  • 5
0 votes
1 answer
2k views

VBA to find Specific text in a range of columns

I have value as "TRUE" in columns B to H. I want my macro to return "FALSE" in column A if any of the cell in range B:H contains "FALSE" else "TRUE". And do it ...
Rax's user avatar
  • 5
-1 votes
1 answer
56 views

VBA/auto sorting help on EXCEL

I am trying to put VBA code that makes it so that when I automatically input values into a table they are automatically sorted. It was working for some of the charts, but now only the last chart ...
Seb's user avatar
  • 1
1 vote
0 answers
228 views

Excel VBA Macro: Formatting Duplicates and Uniques

I have a spread sheet where each row consists of information about a member of a group. In each cell of column B there is an integer that represents each person (i.e., think of an member ID). All ...
ccwv4372's user avatar
0 votes
0 answers
142 views

Excel Macro error prompting Save As dialog box with weird file name

I made a code for a friend something like this : Sub SaveToMainData() Application.DisplayAlerts = False Application.ScreenUpdating = False pfn = ThisWorkbook.Path & "\Backup\MainData.xlsb&...
karma's user avatar
  • 111
1 vote
0 answers
45 views

Skip rows with NULL value

I have this code I have been using to find the 50% exceedance value per hour and month. Attached is a picture of the data. There are some NULL values in the Gen columns and I need the code to skip ...
Sam's user avatar
  • 11
1 vote
1 answer
561 views

Create a macro on Word to save with current name at a different location

I have a Windows 10 PC. Basically I have a similar problem to this: How can I save a file to two locations at the same time?, but just the opposite. I have files on a USB stick, and I want them to be ...
George Lee's user avatar
1 vote
1 answer
4k views

Excel VBA - add date and time to a file name as FILENAME_MMDDYY_HHMMSS

A few weeks ago I posted about using VBA To prompt me to add a file name when saving an excel file using a macro. Thank you for all the help. I got it to work!! Now I have another similar question. ...
Kirk Thompson's user avatar
0 votes
1 answer
111 views

look for empty cell between non empty cells in one row and then put 0

enter image description here enter image description here A B C abc 30 40 def 4646 ghi 45 3234 So, I want to write a macro code where it takes all three columns into consideration at once....
Aadya's user avatar
  • 1
0 votes
1 answer
1k views

Set default zoom in Excel on a new sheet

I have set zoom level when new workbook is open with this code: Private Sub Workbook_Open() ActiveWindow.Zoom = 109 End Sub How to I set custom zoom on every new sheet that's created in that ...
IGRACH's user avatar
  • 499
1 vote
0 answers
56 views

Clicking on an unlocked cell on a protected sheet is unprotecting the sheet

I have a workbook with multiple sheets. There are unlocked and locked cells. I have a macro to protect all sheets. After I run the macro and all sheets are protected, when I then click on a cell ...
Ana's user avatar
  • 11
1 vote
0 answers
51 views

Creating .txt files from excel columns with description [closed]

I am trying to create .txt files that have the following: Txt file name would be cell(A1) Content of the txt file needs to be the content of cell (B1) Repeat throughout the column I am new to VBA and ...
Abdullah Al Jaja's user avatar
0 votes
1 answer
1k views

Merge PowerPoint Presentations Slide By Slide as Animation

I have 12 PowerPoint presentations (one for each month) with same number of slides and each slide contains similar reporting info/trends/tables for the corresponding month. I would like to merge all ...
DigitalNomad's user avatar
  • 1,708
1 vote
1 answer
667 views

Word 365 Allow Macros to run on Read-Only/Protected View

I am attempting to upgrade our company to Microsoft 365 x86 from Office 2019x86. We are currently stuck on 32bit because our electronically controlled document process currently has VBA macros that ...
Acurze's user avatar
  • 11
0 votes
0 answers
59 views

Multi Sheet Inventory that allows for an ordered quantity to be entered, once product delivered, the stock column updates to existing + ordered

I've been breaking my head over this one. I have an inventory that has 10 sheets and a 500 different items. Stock entry To enter data, you can select the manufacturer (Lieferant), the page on which ...
LukaV's user avatar
  • 1
0 votes
1 answer
140 views

Solution to populate a ComboBox

Hello any suggestions for two small problems I have with the codes. I am working on a form that when entering the origin city (Enter city #1:) and the destination city (Enter City #2:), based on its ...
Camila Sanchez's user avatar
0 votes
2 answers
513 views

Excel VBA Macro to remove a specific duplicate character and leave one instance each time it finds it in a string

Windows 10 Microsoft Excel 2019 I have a Excel worksheet with multiple strings in each cell of Column A The strings are formatted like this: Some Text;;;;;;More text;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
Kenny's user avatar
  • 77
1 vote
1 answer
589 views

Sort values based on colors, then on values using VBA code

I'm tryin to sort values based on colors, then on values The macro was working very well, but on one sheet, so I have to create a new module for each sheet, and because I have around 400 sheets, This ...
Saher Naji's user avatar
0 votes
1 answer
112 views

Word VBA Regex replacement text inserted to wrong place

I have a Word template with a macro that makes text replacements. But it pastes the replacement text to the wrong place. However, using the Word Search/Replace function manually (Ctrl + H; "Use ...
Johnnygirl's user avatar
0 votes
1 answer
102 views

When an Ecel workbook with LAMBDA function must be saved as macro enabled?

I am looking for the LAMBDA function to replace the below VBA function for evaluating strings: Function Eval(Ref As String) Eval = Evaluate(Ref) End Function I made a minimum function in the Name ...
gergelykocse's user avatar

1
2 3 4 5
15