Questions tagged [vba]

Visual Basic for Applications; a subset of Visual Basic used in all Microsoft Office applications. Consider using this tag together with the tag for the specific application in question. Good questions on VBA generally contain some code and asks for solution of specific issues. Questions asking for entire solutions (please give me the code / how to do this and this with VBA) are off topic and will be closed as too broad.

Filter by
Sorted by
Tagged with
1
vote
1answer
18 views

Searching a cell for a particular string, outputting a different string in a different cell

I'm looking to search for a string in a cell, and then output a different string of text into another cell. Example: Cell A1 contains the string "370904RV". I'd like to search for "37&...
-1
votes
0answers
22 views

Assist me with a small vb code script for an Excel button to open links

So this is what I want to do: I am trying to get a button to somehow open a specifiable quantity of hyperlinks. The hyperlinks are put into a column, say D4:D100. Obviously I don't want to do 96 at a ...
0
votes
0answers
29 views

Importing data from .csv to Excel by adding columns to an existing table

I have a seemingly complicated task for importing data to a worksheet and I'm new to macros and VBA in Excel - hopefully someone can help me out! I have an Excel spreadsheet containing a table. ...
0
votes
0answers
21 views

How can I delete a column in sheet 2 based on sheet 1?

I have two different sheets: "Input"(sheet2) and "Instruction"(Sheet1) I want to delete the whole column in "Input" sheet corresponding to the value in the cell(row 34, ...
0
votes
0answers
22 views

Format Result of VBA code respective to row

I have below sheet I am using below code to get reports in different sheet for Blank cells which Sub Loop_Column_Row() Dim lRow, lCol As Long 'Counter Dim i As Integer 'Find the ...
0
votes
0answers
15 views

Why the Excel Analysis Toolpak is NOT loading once I click it?

I use Microsoft Office Professional Plus 2013 in windows 8.1. Recently, I noticed that if I click on the Data Analysis Toolpak in Excel 2013, it doesn't LOAD the dialog box with the list of standard ...
0
votes
1answer
19 views

VBA code to generate report of blank cell in different sheet

Hi how i can modify below code so all blank cells value are generated as report in different sheet , taken this code from my different post which i posted earlier ! but found it will end if it find ...
0
votes
1answer
24 views

EXCEL VBA Loop through cells and conditionally concatenate

I have two sheets. The first sheet contains this table: id seller state reason 1 bla1 approved not supported 2 bla2 rejected rejected by seller 2 bla3 rejected rejected by seller 3 bla3 failed ...
0
votes
0answers
16 views

Macro validation and conditional check

i have below excel where i want to do data validation for ColumnName1 ColumnName2 ColumnName3 & ColumnName4 and as well check the condition if ColumnName6 = ColumnName7 && ColumnName5 = ...
1
vote
2answers
43 views

How to create multiple columns from a single one, combining rows with a common cell?

My data looks like this: USERNAME ENTRY_TYPE ENTRY_CHOICE user_a ice_cream lemon user_b ice_cream strawberry user_b ice_cream blueberry user_c ice_cream chocolate user_c ...
1
vote
2answers
33 views

How do you use VBA to check if an OLEDB provider is installed?

I've got an Excel workbook that uses the OraOLEDB.Oracle provider to update various tables from an Oracle database. It's likely that the book will be distributed to people who don't have the Oracle ...
0
votes
0answers
34 views

Unfiltering partially is disproportionally slow in Excel

I have an (admittedly pretty large) spreadsheet (around 80,000 rows of around 200 columns). It does not contain any formulas. Excel has a very weird behaviour of (un-)filtering and I'd like to know ...
0
votes
0answers
24 views

Convert to VBA Code

I have a multiple sheet workbook. I am trying to sort by Column A (date) in ascending order. Then I need everything greater than 180 days to be red. Everything between 0 and 180 days orange. and then ...
0
votes
1answer
42 views

message box for empty row in excel

i have large excel with many rows which can increase in future ,so i want to identufy the way if on button click i can check if any field is empty , i tried below macros with checking cell value and ...
0
votes
0answers
21 views

Copy data from desktop excel to onedrive excel

I need to copy data's from one desktop excel to one drive excel file by VBA. Is their any option works by VBA? Like This I need to convert One drive excel source Dim Iws as worksheet Dim Ows as ...
0
votes
1answer
20 views

Hide rows based on cell value X AND then all following rows until value Z

I have a huge Excel Spreadsheet and have certain rows marked with an "X" in Row B. Those are not important to me and I´d like to hide them. However, I would also like to hide the rows ...
2
votes
0answers
27 views

VBA vlookup for multiple columns

I am trying to compare two tables of data on the same sheets and display matches in a 3rd table. I can get the first column in the 3rd table to return matches however the other matches don't display ...
0
votes
1answer
25 views

VBA run module 1, wait till finished then run module 2, wait till finished then run module 3, wait till finished then run module 4.?

Excel 2019 Windows I have 4 page workbook and each page has a VBA module that performs various tasks on the data from the previous worksheet so they need to be run one after another but ONLY when the ...
0
votes
0answers
10 views

VBA - Edit Base Data from “Edit Sheet”

I'm new to vba. I'm looking to filter a column based on a code the user puts into an input box. I used the following code: Option Explicit Public Sub Filter() Application.ScreenUpdating = False ...
1
vote
1answer
39 views

Show a value from the cell, which is next to a cell, containing an already found value (A1, A2)

I want to upgrade my search and I want lRow, cell 5 to show the value after .Cells(lRow, 4), which is rFound.Value. I tried with FindNext, but it searches for a specific string. And then lRow, 6 to ...
0
votes
0answers
16 views

Excel cursor stuck in cell after one macro runs but not another

I am working on a scan sheet for verifying 3 different barcodes for the same part. The first field is for the master scan, the second verifies that the correct parts, and the third verifies the labels....
-1
votes
2answers
182 views

Delete blank space when inserting Style Separator using vba

Hello everyone and sorry for my English: I have this macro that adds a style separator and it works fine, except it adds a blank space in front of the paragraph. How could I modify the macro so that ...
0
votes
0answers
49 views

Look up list of values on different worksheets and return both column and row header

I am trying to look up a list of values in multiple worksheets of a workbook and return both the column header and row header in the cells next to my search value. I found a code that works perfect ...
0
votes
2answers
31 views

Removing empty spaces from columns in VBA

I am trying to parse data in 2 columns, so that spaces no longer exist. I found this piece of code which removes the trailing and leading spaces, but not the spaces contained within. What changes ...
0
votes
1answer
19 views

Message box to appear if search item not found

After my search is completed, a pop up window shows: Pop Up window Done When I click on Done, it opens a new sheet with the results: Results Sheet I would like, when nothing is found the pop up window ...
0
votes
1answer
47 views

How to search multiple workbooks for Cell information - upgrade?

I have these several huge Excel files, each with a lot of sheets. I have to manually search each of them for specific string and to check if it exists somewhere. I have found the following code here ...
0
votes
1answer
22 views

Macro to Remove Spacing Between Graphics/Text in Word 2010 Document?

I frequently create Word (version 2010) documents that have only graphical items, and occasionally with some text beside a graphic, such as "New!" (that I would like to keep). I would like ...
0
votes
1answer
37 views

Compare Names and DOB in two Excel sheets and return the value in a third column

Valued programmers, I hope you can help me modify the VBA code below so it works properly. I have an Excel workbook that consists of two worksheets. Worksheet "Data" contains Names (Column A)...
3
votes
2answers
24 views

Word VBA: Hyperlink .Range.Font.TextColor.RGB and compatibility mode

Could someone please let me know why the first line of code below throws error 445 (Object doesn't support this action) when run on a Word document saved in compatibility mode? The second line works ...
0
votes
1answer
32 views

Excel VBA - Copy Rows by Unique Value in Column A

I have managed so far to pull all my data from different sources into a “Master List”. From here I would like to pull all rows with matching values from column A into its own sheet. I.E. All rows ...
0
votes
2answers
46 views

Excel default Find by columns, not rows

When using a particular workbook in Excel I want the default Find to Search By Columns, not By Rows (which seems to be the immutable default). If I manually make that change in the Find Options it ...
0
votes
1answer
85 views

Microsoft Excel Power Query to Get Access Data , Based on cell value

I need to export MS Access data to MS Excel by Power query Here I need to filter ID by cell value A1 This is the query Source = Access.Database(File.Contents("C:\Users\Bas\Documents\...
0
votes
1answer
19 views

Excel - Macro - Data copying with values

I have a macro where it copies a range from a sheet and pastes it into another sheet. Sheet name - MAIN Range - C4 - D26 Date sheet - DATA Then when you enter new data and use the macro, it copies the ...
1
vote
2answers
35 views

Mirror a group of cells elsewhere in the same sheet

I am trying to have an interactive table multiple places in my sheet to prevent my users from having to scroll repetitively through this massive sheet. every time this table is updated from any of the ...
0
votes
0answers
29 views

Macro not showing up before VBE is open

I've added a VBA module to an Excel workbook and saved the project as an XLSM file. One of the subroutines was defined such that it shows on the Macro list (the one opened by Alt+F8). When I open the ...
1
vote
1answer
77 views

Excel: How can I create a slicer based on data from multiple columns

I'm using PowerQuery and Power Pivot to analyze some data. I would like to create a slicer based on data from multiple columns. Typically slicers are tied to a single column. The below table is a ...
1
vote
2answers
12 views

Disable automatic VBA window opening while opening an Excel document

I have an excel document and I added some vb script to find the password of the protected file. I took this script from some internet forum. After that, whenever I open this excel sheet the vba window ...
1
vote
2answers
48 views

Pivot auto date filter in vba

I have issue while filter today date in VBA. Because the format changed for each user. How to set it as universal format? My code: 'FILTER TODAY DATE IN PIVOT Private Sub Worksheet_Activate() On ...
1
vote
2answers
119 views

Excel copy cell value to another cell if cell value changes

When a cell (A1) value is changed, it will be copied to another sheet (sheet3) in particular column (c)each time creating new cell. the code works fine if cell value in A1 is manually entered, but ...
0
votes
0answers
23 views

Opening SharePoint Excel file through desktop application warnings “Some files can contain viruses”

Only some users in my organization get this error when they try to open an excel file through excel desktop application that is one our SharePoint: I tried every thing on the users excel options in ...
0
votes
1answer
121 views

Conditional Formatting to apply colour of the formatted cell to the column referenced in that cell (variable cells & range)

I'll be applying this formatting as VBA but for now just need to know how it can work. I have a range and each cell in that range is to have a column letter inputted. When that letter is inputted I ...
1
vote
1answer
38 views

VBA For loop skipping the first iteration

I'm trying to write a macro to detect if a cell contains a certain word. If yes, copy the entire row to the next empty row. In this case, I'm trying to detect "60s" from "Full Length, ...
0
votes
1answer
24 views

Introduce pop up message when macros execution is complete

Below is current VBA instructions. Would like to add a message at end to let user know when macro is done such as "Done" , "complete" or "Now please go to step 3" Sub ...
0
votes
1answer
35 views

How to create a Destination file that is linked to a Source on Excel offline?

I am struggling with an excel feature regarding creating a Source and Destination workbook. My Source data comes from the web using which I must create dashboards on Power BI. But before that, I make ...
3
votes
1answer
113 views

VBA: RubberDuck add-in: @VariableDescription how it works?

I use RubberDuck add-in (beside other) to annotate my VBA code using @Description (for Subs, Function, Properties...) and want to use @VariableDescription for variables. But unlike @Description used ...
0
votes
1answer
202 views

How to create a source and destination worksheets in Excel?

I am struggling with an excel feature regarding creating a Source and Destination workbook. My Source data comes from the web. So I download it, create few new columns and functions and use it to make ...
0
votes
1answer
35 views

Conditional formatting for specific group of values/rows based on cell value(s)

I am having some data table that is separated in lets say "blocks" of rows. As you can see on the image, starting from Column D (A1) there are some values in first row, and then 5 rows empty ...
0
votes
2answers
50 views

Finding and deleting rows in Excel

How can I find and delete rows in Excel that start with a cell that has a value, and the cell below has a value as well.Excel Data The screenshot attached shows some dummy data that I've got. In this ...
0
votes
0answers
22 views

Gray Box in Excel VBA Editor

A gray rectangle appeared while I was editing when I pressed something I wasn't supposed to. Is anyone familiar with resetting the Excel VBA view or getting rid of this rectangle? I'm working on a Mac....
-1
votes
1answer
26 views

how to Hyberlink many cells with pdf files automaticly

Is there any method to hyberlink a large amount of pdf files into excel column without repeating (hyberlink for just one file) manually for each cell ?

1
2 3 4 5
66