All Questions
Tagged with vba microsoft-excel-2010
516
questions
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
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
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 ...
0
votes
0
answers
735
views
How do you get the raw data of an Excel file?
The European Union (EU) provides an Excel file that has data on trade between various countries. Their Excel file, however, only shows data between countries based on a filter function. It seems they ...
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&...
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.
...
1
vote
0
answers
86
views
VBA code to copy data from different works book to specific sheet of master workbook
I have to copy data from 15+ workbooks and combine it into a different master workbook. All these 15+ workbooks are identical and contains a sheet(tab) named 'Comment' and have same header names for ...
0
votes
0
answers
221
views
Count dependents in other sheets VBA
I want to count the number of dependents of a cell in same sheet as well as in other sheets using VBA.
I have used below code and results are in the picture.
enter image description here
Sub tst()
Dim ...
0
votes
1
answer
562
views
How do I replace text in rows by the respective columns?
I need to replace text "vegetables" in rows 1-5 entirely with the respective car make names in column A.
For example row 1 should find the word BMW and replace it with all words containing &...
1
vote
1
answer
133
views
VBA Changing font color
S.No
Topic
Priority
Action
From
Date
Responsible
Target
Done
Comment
1
FuSi
3
kjkj
SSR0
26.07.2022
MR.BBBB
18.08.2022
kjkjkj
2
FuSi
3
kjkj
SSR0
26.07.2022
MR.BBBB
19.08.2022
kjkjkj
simple task. I ...
0
votes
0
answers
39
views
How to add a cell automatically to a sheet when I add another cell on another sheet?
I have some time series data, so I will add one new data point to one excel sheet for several sheets in an excel file, then I also need to add all these new data point to another sheet, so that I can ...
0
votes
0
answers
36
views
Auto adjust cell values if one cell values changed
how to adjust values automatically if cell values A1 has changed means then the changed values has to adjusted with B2 values and the final cumulative values remains unchanged.
Suppose i have list of ...
0
votes
1
answer
21
views
I have a worksheet with multiple tab and i want to separate each tab that contains same text into a separate sheet
I have a worksheet with multiple tabs, can i get a VBA code that will separate each tab into multiple files
I want to make A1 and A1 SCREEN as one file, then B1 and B1 SCREEN be on another file and ...
1
vote
1
answer
805
views
Find Closest Match (Conditional Lookup)
I am trying to do conditional lookup in Excel (MacOS). Let's say I have the table shown below, and I want to search for (type=alpha, length=165). In the table, there isn't an exact match so I'm trying ...
0
votes
1
answer
89
views
Highlight entire rows based on cell values
I want to highlight entire cell values when the row values changes.
For example, row contains
A
A
B
B
B
C
D
E
E
Final result : i want to highlight above the row by means of A has to in one color and B ...
0
votes
2
answers
674
views
Excel VBA - Dynamic Array not Working
I am trying to make an array that stores all of the values in Column A from "Workbook B" so I can then reference and see if a cell's value is in that array in Column A from "Workbook A&...
0
votes
2
answers
13k
views
Excel VBA - If Statement Checking If Value is in Array
I have a lot of variables I have stored in an array. I am trying to use an If Then statement to see if the value of a specific cell is in that array. Here is my code:
Dim Vars1 As Variant
Vars1 = ...
0
votes
1
answer
443
views
Excel VBA - Selecting Row in For Loop
I have a for loop that goes through Column I and looks for when the value exceeds a certain point. It then inserts a row.
I need to edit this row. I need to merge a portion of it and insert text and ...
0
votes
1
answer
83
views
Excel: Count Weighed Cells
I've an excel-spreadsheet, which is my timetable. this means, that I've some tasks, which is almost always a connected cell, sometimes I connect 20 cells, sometimes only two. Example
Since every cell ...
0
votes
1
answer
283
views
Explanation to understand a VBA code for percentage change
I am learning to create formulas in VBA from the internet, and I came across this article by Jon from excel campus where he was teaching to create formulas for the percentage change.
I, however, was ...
0
votes
1
answer
412
views
Excel VBA - paste every value in a table column into the location listed in another column of same table
I made an example of a simpler version of the spreadsheet I'm working on.
On Sheet2 there's a three-column table. First column is the description, second is the value and third is the location I ...
0
votes
0
answers
275
views
If Cell Contains Text Then Copy to Another Sheet
I want to copy a collumn on to another excel sheet where the first cell starts with: "Not Found"
If a cell in the first collumns contains "Not Found" I want to display them ...
0
votes
1
answer
52
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
2
answers
939
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 ...
0
votes
1
answer
74
views
How to delete a column of one sheet based on value in other sheet by ignoring N/A value?
I am working with an excel file where in Sheet1, I need to compare column C and Column E. If in any row of sheet 1, Column C value> Column E value, then I need to delete certain column in sheet 2.
...
0
votes
1
answer
675
views
VBA code for Multiple inputs search comparison
I need to search from a data in excel using a macro
If for example above image is a default list and if i gave a input using a input box.
Case:1
If input as "a1,a2,b1,c4"
it should reflect ...
0
votes
1
answer
119
views
Excel Bulk Save Images through Powerpoint, .Shapes.SaveAs not working
I need to bulk same images embedded in Excel to original resolution. I found this code on internet, but it's not working and needs modification.
It gives an error at .Shapes.SaveAs
The images are ...
0
votes
1
answer
1k
views
Bulk Save Embedded Image in Excel with Filename on same row
I have list of 500 embedded images in an Excel and need to save them all as original size jpg (images embedded and sized within each cell) with file name on same row.
1st image in C1, file name in D1
...
1
vote
1
answer
202
views
Excel VBA - Post with empty cell values
I have a Macro that takes text entered into a textbox and posts it to the next empty row. This simulates a running list. The problem is that if the textbox is left blank, the next time the user clicks ...
0
votes
1
answer
100
views
Invoice data copy to another sheet but not the formulas
I see a lot of questions here on this site but not sure if mine has been answered. I found a macro and made it work for what i need except for one thing. When it copies my data over from sheet 1 to ...
0
votes
1
answer
257
views
Automatically producing names of images in Excel
As described here, Excel introduces generic filenames of images loaded into a spreadsheet. I wonder if it is possible to create a VBA script, or something else, that would book-keep these names in ...
2
votes
2
answers
87
views
matching all highlighted dates in one column to those of another column
I'm currently stuck on this step of my project. image of my document My ultimate objective is to highlight all highlighted dates in column P in column M. I was wondering if there was a formula so that ...
0
votes
0
answers
453
views
count the number of times a cell has dependents in excel VBA
In the picture, you see I have 3 columns.
I have written the VBA code to show the count of dependents in C column.
Here is code.
sub countdep()
ActiveCell.Offset(0, 1).Value = ActiveCell.Dependents....
0
votes
2
answers
1k
views
VBA Save ONLY VISIBLE Sheet as Workbook
I was working with the following VBA (attached below). It works great, and what I like the most is that it is Path/Name independent.
I am now trying to save multiple reports which are based on some ...
-1
votes
2
answers
251
views
Make a text file from Excel using first colum as name input
I've tried to make my first VBA macro.
It gives me an error when trying to run it, why?
Any one able to fix it so it works (that is first use first column as text name and all the other as text in ...
0
votes
1
answer
1k
views
Removing stuck named range on a xlsm file
I got a .xlsm file with some kind of problem. When I open it on Excel 2010, it shows the following message:
It translates:
Excel found unreadable content in "Checklists.xlsm". Do you want to ...
1
vote
1
answer
151
views
Chrw() Anomally: Invisible Values
I found an anomaly that I don't understand. I generated a list of special characters (into a column of cells) using the Chrw() function and the list was created just fine. However some of the cells ...
0
votes
2
answers
107
views
MS Excel - How to drop the character between the concatenated cells
I need to concatenated cells and put a comma between them. But some cells in the concatenated columns are empty and the result shows the commas between them. How to drop the commas if a cell is empty? ...
0
votes
1
answer
131
views
How can i simplify my code using LOOPS in VBA
I need to copy contents from a column in one worksheet and paste it into another (at the same time making a total of 7 copies of each of the variable). There are multiple columns and each column has ...
-1
votes
1
answer
4k
views
VBA to copy entire cell values to clipboard [closed]
Sub Test()
Dim copycell As DataObject
Dim ws As Workbook
Dim strText As String
Set ws = Workbooks.Open("C:\Users\Desktop\New Microsoft Excel Worksheet.xlsx")
strText = ws.Sheets("...
0
votes
1
answer
2k
views
Transfer data from one file to another in Excel automatically
I have two Excel files, the first file contains about 5500 cells, the second file is empty and I want to transfer the contents of each sheet in the first file to the cells of the second file.
Clearly,...
0
votes
0
answers
416
views
Excel VBA - loop through combinations and formula and display values that meet criteria
I'm new to excel VBA, and this is beyond my scope. I'm hoping someone can assist.
I have 3 input (user input) variables to start with (this number needs to goto Nth number).
I have a target number ...
0
votes
1
answer
141
views
Excel 2019 Corrupting Files - I run Windows 10
I've upgraded to Excel 2019 and run some fairly basic VBA code on files created in Excel 2010. I'm finding Excel 2019 corrupts my files randomly (I save daily versions of similar files where some data ...
0
votes
0
answers
36
views
Find and copy values between workbooks
I am trying to automate the task of finding the part number in another workbook (a workbook containing just over 100 sheets) and copying the data into the working sheet.
I have two excel sheets ...
1
vote
1
answer
70
views
How to make dependent cells follow decimal formatting of parent cell that changes from time to time?
I need dependent cells in an Excel worksheet to follow the decimal formatting of a parent cell. I've done this with format painter, but my parent cell decimal requirements change from time to time,
...
1
vote
1
answer
533
views
VBA - Copy range from 300 closed workbooks onto one main consolidated workbook
Please help with writing the formula to pull data from 300 closed workbooks (and I don't want to open any of those 300 workbooks). Description of project: There are 300 excel timesheets. Need copy ...
1
vote
1
answer
234
views
VBA excel - Is there any way to ensure the user cannot call/run a macro in the immediate window?
So I have written a VBA application and locked the VBAProject (unviewable). But of course, the user can still have access to the Immediate Window (if they open another excel file for example and ...
0
votes
0
answers
999
views
Create a report in Excel from a Master data using a pre-defined Template
I have bunch of data in a table called master list. I need to copy each and every row of data into a predefined template into separate excel files.
My master table is as below named as Master.xls. ...
1
vote
0
answers
138
views
Can Excel have a persistent data connection when loaded as an unopened attachment in Smartsheet?
I have an Odata source that I have mapped as a data source in Excel. I can schedule that to run in the background and continuously update the data file. I need to now attach this excel file to a ...
1
vote
1
answer
1k
views
VBA - Listbox select item, gives cell address
Trying to get the cell address from a selected listbox item.
ListBox name: CBView
RowSource: F1:K99 (therefore, column K = column 5 in the listbox)
The objective is to select a line in the ...