macro

  1. M

    How to create output for a specific line in Macro?

    I have a macro code and I want to make output for some lines. Is there a way? consider the following, I want to see what is the "ActiveCell.Offset(off, 0)"? Sub Opter() 'Application.ScreenUpdating = False 'Call Module1.Iterations Do While IsEmpty(ActiveCell.Offset(donum, 0)) = False If mini = 1...
  2. S

    Delete two lines above bookmark - keep bookmark VBA

    Hello, I hope you all are well. I want to write a macro to delete two lines above a bookmark in a word document. So far so good, but the bookmark itself should not be deleted. I have come up with the following code: Sub DeletetwoLinesAboveBookmark1() Dim r As Word.Range Set r =...
  3. G

    Count consecutive negative numbers

    I am looking for a formula or vba, whichever is easier, where if the value in the row is negative, it will count until the next 0 or positive number, for the whole column. An example is below. I searched and couldn't find the exact thing I was looking for. Any help will be greatly appreciated...
  4. A

    Excel freezes while running macro

    Hello all I have a module which gets data from a web API and then copies that data to the excel sheet, while this macro is running, all the other excel sheets freezes for a couple of seconds. Any help to optimize this code would be greatly appreciated. I just want this macro to run in the...
  5. G

    Macro for Convert DOT to Comma and Comma to DOT

    Dear Friends, Need help from you, i am trying to convert Dot to comma and when i covert the value decimal points are not appearing example attached and given below as well. When the third decimal point if is zero then i am not getting the third decimal after i convert example below. Input ...
  6. M

    VBA macro help reflection workspace

    Hi, When I running below code works fine ExcelApp.activesheet.range("b2").copy But below code shows error as (object doest support this property or method) ExcelApp.activesheet.range("j2").paste Please help
  7. S

    Delete content of Word chapters but keep the title - VBA

    Hello, I hope all of you are healthy. I have a word document that contains several chapters including assessments concerning various topics. Since I have to update the document each week, I have tried to write a macro that deletes the contents of all chapters, but keeps the title of the...
  8. E

    VBA - Help with LOOPs - copying range to another worksheet's next available row

    I am looking for some assistance making the code below run for all selected cells in rows 27-67. The code below works for the first row; it copies contents from the selected cells to the next available row on a different worksheet.How can I make it loop through rows 27-67, copying cells from...
  9. O

    A problem about "information transfer between sheets".

    Hi everyone! Let's say there is information on Sheet1 consisting of 3 columns. When I write one of the information in the third column in a cell on Sheet2, I want the other two data in the row of the information to be printed. I would be glad if you help. ex: Get the name, age and citizenship...
  10. L

    Auto fill cells based on their color

    Hoping someone can shed some light on this, I am looking for a macro that would fill all the red cells with the text at the top of their respected column i.e AWV, CPE, CCM etc. I have not yet found anything that can recognize each individual column, always fills red cells with the same text...
  11. R

    Unable to automatically pull data and perform custom modifications to a table from a query whose source is a dynamically changing link

    * I posted this on the excel forum, but since this also relates to power query I also am making a post here. Hey there, I am trying to make excel get automatically get data from a link (however the link changes based on certain inputs like ticker symbol, time intervals, to/from time) instead...
  12. A

    Copying selected cells from one sheet 1 to an empty row in sheet 2

    I'm trying to figure out the code for copying selected cells from one sheet to an empty row in another sheet, this is what I have so far, but I cannot figure out how to make it so that it copys in next empty row, rather than replacing whats there Range("A24:G24").Select Selection.Copy...
  13. R

    Unable to automatically pull data and perform custom modifications to a table from a query whose source is a dynamically changing link

    Hey there, I am trying to make excel get automatically get data from a link (however the link changes based on certain inputs like ticker symbol, time intervals, to/from time) instead of manually typing out the inputs into the link, putting it into power query, performing transformations, and...
  14. Saher Naji

    Auto-Fill values (2)

    Hello O great and smart people actually I posted a similar thread before some days, and Mr. @alansidman graciously did a great help and his code is working very well, 100% and this is the post link for the solved problem: https://www.mrexcel.com/board/threads/auto-fill-values.1133259/page-2...
  15. B

    Moving to a previous sheet macro

    Hi, I have a macro that enables me to move to the previous sheet. However when back at the start I would want it to loop back to the last sheet in the workbook. The current code is displayed below and it checks for any hidden sheets and it misses out the first sheet which is the home sheet. Any...
  16. A

    Macro/Solver to assign correctly the correct quantity of purchased apples

    Hello everybody I will purchase a quantity of apples during the year, and 3 sellers made me their offers (quantity of apples and price per apple). Those offers are in sheets Seller 1, 2 and 3. So I need to determine what is the best combination among those offers, purchasing at the lowest...
  17. R

    Macro merger of filenames that start with a specific name

    Hello, I have a macro that consolidates all filenames that start with "BDRIDGE" and have a "DATAx" sheet.name from all containing subfolders. The path of the subolders being added in the 1st sheet of the macro file. My problem is that the macro does not retrieve anything as it only runs and...
  18. Saher Naji

    Auto-Fill values

    Hello Thanks in advance, I tried to crate a formula, but the problem I have to make the formulas fixed by $ symbol, this will cost me a long time What I'm looking for is a formula or a macro to do this thing automatically each time, because I have hundreds of rows, and the number of boxes...
  19. B

    How to stop the cancel button from carrying out the sub?

    Hi, I am fairly new to vba and am trying to work through a spreadsheet. At the moment I have managed to create a macro via vba as shown below. It currently works via pressing the required button and an input box being displayed which asks for the name of the new sheet to be created. The new...
  20. M

    Macro to create a copy of my worksheet - in a new document as values (no formulas) and with a few changes (row deleted and a few other things deleted)

    Hello! I have a document that has some internal-only info but most of it is what we need to send to external parties. I'd love some help creating a macro for my internal doc that will create an "external copy" that: - is 'paste as values' (ie same formatting but no formulas) - has a few columns...

Some videos you may like

This Week's Hot Topics

Top