Questions tagged as 'excel-vba'

1
answer

How to make a "for each" loop in column P up to the last line filled in VBA?

If you set the entire column P:P the sheet will freeze. How do I set rng , any ideas? CODE: Sub teste() Dim rng As Range Set rng = Range("P2:P300") 'Estou a definir até à linha 300 para não quebrar For Each Row In rng.Rows If...
asked by 03.06.2017 / 19:30
1
answer

How to copy and paste as an image with VBA?

I need to copy a graphic and paste it as an image on the same worksheet. I'm trying to select the range that contemplates any special graphics and paste as a Bitmap or Enchanced file. Here is the code: Range("AM18:BE22").Select Selection...
asked by 03.11.2017 / 17:43
1
answer

Counter to insert blank line every 5 equal cells

Hello, I'm trying to make a macro for a button, which puts a blank line every 5 cells with equal content, however I'm quite lazy in the VB syntax and I'm not sure if the logic is correct either, example of what should happen: ADA ADA ADA ADA AD...
asked by 05.04.2018 / 21:16
1
answer

What excel function should I use?

I have a list of male and female names that I need to determine in the front cell of the gender of the name. The logic that analyzes the name and says if it is male and female is ready, however, I need to create the following logic, but I do...
asked by 24.07.2017 / 16:53
1
answer

Activex component can not create object when using ErpBS900.dll in Excel

I have a problem that I can not resolve. I have several solutions that use the Spring engines via Excel, I've never had problems with them however, my machine needed to be reinstalled - the OS (Windows 7) remains the same and the Office version...
asked by 26.06.2018 / 18:47
1
answer

Problems closing another worksheet by VBA

I'm running the code below for comparing data from different worksheets. It is running correctly, but I am not able to close the data source spreadsheets. I have already tried with '.Close', '.Quit' and '= Nothing', in all ways the 'subscript ou...
asked by 13.06.2018 / 19:36
1
answer

Merge data from different tabs into one in Excel

I have 18 worksheets (tabs) with user data and I need to copy and paste the data into another worksheet (tab) in the consolidated name. I need to copy the header only from the first worksheet and at the end remove the empty lines. It's all in...
asked by 14.06.2018 / 20:15
1
answer

Filter PivotTable by word in a cell

This other one just below the same post from the link above .. Is there a running difference? ... link Is there any way to speed up the execution of any of these codes .. Type binary format ... or change n even code?? I put a button to e...
asked by 16.06.2018 / 19:54
1
answer

Filter PivotTable by ListBox

Private Sub Filename () .. From this post here Filter PivotTable by Word in a Cell ... It is very efficient in searching the column A .... I would like to get the values that are in the Listbox and apply them as filters in TD ... (Act...
asked by 21.06.2018 / 22:49
1
answer

Limit characters and type of characters

I need some help. I have a worksheet like this: AndIwanttolimitamountofcharactersandtypeInthesegmentcolumnIwanttolimititto6charactersifitislessthan6ormorethan6.Returnsthemsg"Character limit not reached" In the date column I want to lim...
asked by 09.11.2017 / 17:04