All Questions
Tagged with vba microsoft-excel
2,769
questions
0
votes
0
answers
12
views
VBA: Row being pasted needs to all be in the same row, not look at last blank in that column
The VBA code I have currently pastes data into the last blank cell "End (x1Up). But in column C, there is often blank cells, so I need it to look column As last blank to know where it is pasting.
...
0
votes
0
answers
28
views
ByVal target range returned is in unexpected format
The target.address variable that is passed, is $127:$127. In terms of range, what does it mean?
Private Sub Worksheet_Change(ByVal target As Excel.Range)
If r Is Nothing Then Set r = New Revenues
...
0
votes
0
answers
29
views
Excel VBA to list Sheets in selected Workbook and copy listed Sheets to end of Main Workbook
I have a working VBA code present in a Main Workbook which is designed to browse and select Another Workbook and generate a list of names of all Worksheets present in the selected book in the Main ...
0
votes
0
answers
30
views
Excel - Highlight Row of Selected cell
I want to highlight the row of the selected cell in any active workbook. How can I achieve my goal?
I have experiences in highlighting selected row by using conditional formatting and change event. In ...
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 ...
0
votes
0
answers
46
views
How to append multiple .csv into one .csv (not multiple sheets .xlsx)?
Looking to do something like this:
Is there a script that can do that? I've tried searching and the scripts are either 404'ed or they merge them into a single .xlsx with multiple sheets.
0
votes
0
answers
30
views
Using VBA-JSON to retrieve the value of a key that is in an array
I'm trying to use VBA-JSON to parse a dump from Wiktionary. I gathered from the example here that if the key you are interested is in an array, you specify the index in parentheses starting from 1, ...
1
vote
1
answer
34
views
Convert input box to pick column into number to apply to range
I would like to use the inputBox to pick a column by user and apply it to run on each row index but haven't had a luck. Its saying type mismatch. A lot of things to learn and lacking experience in ...
0
votes
0
answers
55
views
VBA - Search Website, Return Class Element Value
I've created a VBA Script to return a value from a class element value on a website, However this is not working in this particular element. I believe this may be due to the website requiring the page ...
0
votes
1
answer
41
views
Excel: Worksheet.Calculate causes UDF to run infinitely
I have written a udf returns an array that is inserted at the cell location.
the udf can be long running as it reaches out to a rest service to fetch data from a database. so i added a button on my ...
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 ...
1
vote
1
answer
59
views
How to Loop cluster / ranges horizontal to vertical via vba [closed]
Newbie here and would like to get a loop working in Microsoft excel. Basically, to arrange clusters / ranges from horizontal to vertical. I have tried transpose function but have not been successful ...
0
votes
0
answers
43
views
Linking columns on different sheets
I'm very new to VBA coding (only dabbling for this specific project), so I would really appreciate any advice on an issue I'm having. I'm attempting to independently link multiple column ranges on ...
0
votes
0
answers
94
views
Need help to optimize my VBA code
What I'm trying to do is I want to copy the rows to each different type based on record type.
Raw file tab - there are hundreds of thousands rows of data containing 6 different record types.
PRPO TAB -...
4
votes
2
answers
306
views
VBA Macro runs successfully then freezes
I am trying to take data that was merged into one cell and retain the first 6 characters of that cell and move the remaining into the next column then proceed through the worksheet. I wrote the ...
1
vote
0
answers
24
views
Excel- Product cross reference to return amounts shipped vs received
I'm trying to create a tool that allows a data dump of shipping invoices from my company and invoices filed through the state. Then spit out a table where it's easy to see quantity variances.
I have a ...
0
votes
1
answer
86
views
Formula to values once data is entered in another cell
I have columns with formula wherein the result will pop out once a data is entered in column O. Meaning at first these formulas look blank and Column O is like the trigger for the other data to pop ...
0
votes
2
answers
215
views
Excel macro to count cells by color and does not count merged cells as more than 1
How can I write a macro that will go through a range of cells and count the contents by color without it counting each individual cell within a group of merged cells.
For instance, in the picture, I ...
0
votes
0
answers
23
views
Insert MODE.SNGL into a conditional formula pulling data from one worksheet to another
Windows 10
Excel 2019
I have a workbook with two worksheets, Product Data and Product List.
The data in Product List is generated each time the formula I am looking for is run.
The number of products ...
0
votes
1
answer
54
views
Excel VBA - Looping an IF( & VLOOKUP( starting with a partial string
Good day to an amazing community,
I am trying to develop a macro to loop through two arrays. Here is an example of how the data is set up:
Raw data is found in C4:C1500
$ data is found in D4:D1500
...
1
vote
1
answer
138
views
IN VBA, How to sum hours and minutes exceeding 24 in memory (not in ranges of excel)
I'm getting some data in the format of text(like for example "12:47" that means 12 hours and 47 minutes) from a URL document and calculating some parameters like overtime work, shortages and ...
0
votes
0
answers
29
views
Automatic change of keyboard language in a worksheet in Microsoft Excel
In Microsoft Excel, and using visual basic, how to set a default language for different columns? For example, columns A & C should be set to English by default and columns B & D to Persian. ...
0
votes
0
answers
93
views
VBA Excel Multiple files saved in newly created folder named with text in cells range and date
I am trying to create a folder and save as copy of my workbook in this folder for all the filled cells in range B11-B14 of my workbook. I managed to create the folder and the file with the correct ...
0
votes
1
answer
445
views
Excel Macro Code Disappearing in Network Trusted Location
This problem -may- have started around when I switched from Office 2019 to 365, however I've been doing so much upgrades lately (windows 11, server 2022, etc) that my memory is foggy.
Over the past 6 ...
2
votes
1
answer
142
views
Excel VBA Else Without If Error -- I can't seem to find where the error is?
I am configuring a long IF statement, where if the financial period is the same, it merges the cells together under the same period header, and if not, it creates a new header with the new period name....
0
votes
0
answers
76
views
Filtering a Table based on a Cell Reference in another workbook, then copying it
I am trying to filter a table based on a cell in another workbook, the reference for the filter would be in workbook "ReportWB" and the "Project Summary Detail" sheet, cell "...
0
votes
0
answers
160
views
Excel VBA: Export/save won’t work correctly
(Hope the formatting is okay. I’m doing this on my phone, so it’s hard to tell.)
So, I’m trying to create some VBA to automate the clean up process of data I get from my field crews. Everything below ...
1
vote
2
answers
218
views
Excel, update cells when clicking on another cell
I have tried a few different bits of VBA found here on SuperUser but not able to get it to work.
I am trying to update a cell when I just click on another cell.
I have data in A43:A54, it's a list of ...
0
votes
1
answer
93
views
Replace with wildcards in Excel or batch edit some wrapping formula
I'm only trying to delete some CONCATENATE() function from some formulas in Excel.
What I have; here 'Something' could be a lot of things (digits, <, >, texts, etc…
CONCATENATE("Something = ...
0
votes
0
answers
138
views
Highlighting duplicates in Excel with VBA, multiple sheets
I have a workbook set up with a sheet for every month and then a summary sheet, so 13 sheets total. Each sheet, other than my summary page, have two sets of tables set up. A table for each week in ...
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 ...
0
votes
1
answer
790
views
Any way to allow multiple people to edit a coauthored, password protected workbook, at the same time?
I am currently working on a sheet that I want select people to have full access to, while everyone else without the password for the sheet cannot. I can do mediocre and overly complicated solutions ...
0
votes
1
answer
491
views
VBA - Copy Visible cells not selecting everything
I have a very long macro that I've written that looks at a report sheet, breaks it down by many different criteria (putting some of the results on different sheets), and does hundreds of calculations. ...
1
vote
1
answer
36
views
Formulas corresponding to the correct table in my sheet, vba. Multiple tables across multiple sheets
I am setting up a cycle count sheet using VBA. I am having trouble with the formulas in my tables only referring to the first table in the sheet for the input values.
For example, I have 4 tables per ...
1
vote
3
answers
138
views
Convert an Excel table from one structure to the other
Original table
I have this table in Excel or LibreOffice.
Unit number
Type
Name
1
Object
Top
1
Object
Bottom
1
Object
Left
1
Object
Right
1
Object
Back
1
Object
Front
1
Property
Right-Fixed
1
...
0
votes
1
answer
150
views
Excel for Microsoft 365: Obtaining the Default Column Width
I am using VBA in Excel for Microsoft 365.
I wish to obtain the default column width and store it in a Double variable. This is driven by the desire to not hardcode it. I have attempted to obtain this ...
0
votes
1
answer
111
views
Evaluate returning #VALUE? when trying to calculate large VSTACK
I am working on a project that is pulling a bunch of spilled data across a ton of sheets that are all in the same spot as the sheets are based off of a template.
Using the name manager I was able to ...
-1
votes
1
answer
262
views
VBA Code to hide rows on multiple sheets
Very new to this so. Is there any way to have the option cell K473 be on tab 1 and change the hidden rows on tabs 2 to 11? The below works perfectly on a single sheet, but would like to have the ...
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 ...
0
votes
0
answers
29
views
Excel VBA Macro
i need help for problem below:-
when have an empty row, i want next data to fill in on those empty row
i want data row 16 move to empty row 13
enter image description here
For C1 = 1 To 273 Step 46
...
0
votes
0
answers
54
views
Unable to edit the required text and update auto-date
I Should be able to edit any text updated except , "Posted", "Closed" in J Column. Every time I edit the text the date should be auto updated in next column cell. For example, I ...
0
votes
0
answers
100
views
Any way to disable the Accessibility Checker on a Workbook
I am working on a project that for security reasons needs to have the accessibility checker disabled. Although through settings I can disable it on my excel, I need to find a way either through VBA or ...
0
votes
2
answers
525
views
Making a workbook only able to be opened in the excel desktop app
I am working on a project that requires all of the users on it to be on the desktop app for sheet security reasons. The sheet security can be bypassed by simply not having VBA run by opening the sheet ...
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()
'
' ...
0
votes
1
answer
493
views
Creating a VSTACK'd array from a changing list of spilled references
I am working on a project that requires a large 'pool' of data to pull from and sort from. To keep the workbook efficient, the data is kept in sets of SPILL's, as pulling a raw selected range for the ...
-1
votes
1
answer
88
views
VBA "Block If without End If" Error on Worksheet Change
I have a spreadsheet that uses data validation to create dependent dropdowns for several of the cells that have specific values in a database.
Even with the dependent dropdowns a user can still enter ...
0
votes
1
answer
91
views
Hidden Personal Macro Workbook Opens upon running macro to close ActiveWorkbook
I have a macro that I have coded to close the activeworkbook after running a series of formatting and saving it as a PDF. However, it opens a hidden version of the personal macro workbook immediately ...
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 ...
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 ...
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) ...