do loop

  1. VBE313

    Exit Do Loop at Certain Cell?

    How do you exit a Do Loop at a certain cell?
  2. T

    Macro to loop through each row and create a 3d stacked bar graph per row

    Hi all, I have created my Do Loop to loop through my excel spreadsheet by row but I am stuck on creating a 3D stacked bar chart for each row, here is sample data Name Salary Bonus Other Chart a 50...
  3. O

    Populate a Variable size range with changing constants

    Below is an excerpt from a workbook I am attempting to build. I have been trying to automate the population of the correct range of rows in column F based on data input into columns B, C and D. The data in this example is manually entered to demonstrate my desired results. Knowing each row...
  4. L

    Using VBA to insert a dynamic variable formula ERROR

    Good afternoon, This is my first time posting a question on this thread but have seen many How To for my Excel projects. I've been using Excel for over 10+ years and VBA about 3 so it's not too often I come across something I cant figure out. I am trying to insert a variable formula nested...
  5. R

    Find last of multiple entries

    Do While ia < 16383 'limited to how many columns are available to be populated ActiveCell.Offset(0, 1).Select 'shift cell to seach If ActiveCell.Value = SN Then ia = ia + 1 'counter for columns Do While ib < 13...
  6. S

    Simple VBA Copy & Paste Loop

    Hi there MrExcel community, this is my first forum post! So I have just recently started a new job and blagged that I could do some basic VBA and ...well... let's just say that I am on a steep learning curve :) I have a basic repetitive task that I am hoping one of you could help me with. I've...
  7. H

    Do Until Loop Problem

    Hi everyone, See a snippet of my spreadsheet, showing rows and columns that contain data. Note that Data in the ranges B4:B7, E4:E7, B11:B14 and E11:E14 are merged. The Direct Labor for the first person should be 51+4+1 = 56 hr and 3197.18+250.76+62.69 = 3510.63 The Direct Labor for the first...
  8. S

    Do Loop with Countifs is not giving desired results in VBA

    Hi I have a code, which pulls data in few columns from a given data using RandBetween. To remove duplicates in column (except "X"), a code is given below: This code is not giving the desired results, that is it stops itself before checking for any duplicates. Kindly help in correction of this...
  9. M

    VBA Loop without DO Error.

    Heya, Excel is coming up with an error saying: "Loop without Do", while there is a Do statement in place (as per code below). Any tips? Effectively I want the DO Loop to run if the 2nd Cell in a row is empty for the intent to copy data into another worksheet, in addition it must skip over...
  10. A

    Highlighting only the 2nd+ instance of a duplicate in a range

    Hi again, Thank you to those heroes that helped me with my question earlier today, but I've got another one. I'm trying to get this macro to highlight ONLY the 2nd, 3rd, 4th etc instance of a duplicate. I've since reverted to the original formula, but adding in a For...Each counter didn't...
  11. K

    Wait until user navigates away from current internet explorer webpage THEN run VBA code

    Hello, I have a piece of code that opens a webpage in internet explorer. I then want the next section of the code (just picks information off the webpage referring to specific elements) to run only when 'the user' types in a search and navigates to the search results page. The program would...
  12. I

    Excel BA loop correction - Excel VBA

    I am trying to highlight certain cells based on it's column 4 values. Basically, If column 4 value is negative, then we search through the column 4 from the beginning and if there is positive match (That is positive of the column 4 value and then matching the respective column 3 and 6 values)...
  13. N

    Do Until Loop, Loop help please

    I am trying to run a ‘Do Until’ loop in my macro that will search for a word, if its found, select the whole row containing that word, delete it, find the next and repeat. So far I have:</SPAN></SPAN> Do</SPAN></SPAN> Cells.Find(What:="Find_Word", After:=ActiveCell, LookIn:=xlFormulas...
  14. myactiondesign

    User Exit Through Cancel or Close in FOR/DO LOOP

    Hi all, I've got a fully functioning macro that cycles through a range of cells and inserts user input sales data into each cell, one-by-one. The problem is that you cannot cancel or exit. Sub FirstSalesInput() 'This sub will create six messages boxes for user input 'The user input will be...
  15. V

    Help making a Do-While loop... Loop

    Hi all, I'm having trouble making this loop iterate: Do While Cells(96, DtlNxtCol + 2).Value > 0 Sheets("Detail_Sheet").Select Cells(10, DtlNxtCol).Copy Sheets("Summary").Select Cells(SumNxtRow, 1).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone...
  16. E

    Using Loop in VBA to Delete a repeating selection of Rows

    Hi there!! I have a “soft copy” of an 80-page report that was downloaded from an older mainframe system. The soft copy was in a .txt format, and I imported it into Excel using fixed-width delimiters for the columns. Since the report is 80-pages, it translates to more than 1,700 rows of data in...
  17. D

    Checking if data exist in range, if it exist add up the number

    Hello Everyone, I'm pretty new to VBA and hope you can advise me in some coding which I'm currently stuck for days. I have 1 sheet (Sheet 2) which have a list of name, designation, department and hours. In another sheet (Sheet 2) I would like to run a summary of the total number hours in each...
  18. P

    DO loop with an IF statement

    Dear all, I am having an issue getting an IF statement to work inside a DO loop and I was wondering if you would be so kind as to give me some indication as to why it is not working. I have Microsoft Excel 2007 and Windows 7 Entreprise. In my Excel spreadsheet, I have in column B a list of...
  19. E

    Excel vba macro - Loop to format sheet

    Hi there!!</SPAN> I created a macro to automatically insert subtotals into a report. Now I want to include code that will format each subtotal row (bold, shaded). My idea is to have the macro search for “ Total” as a String and each time it finds that character string, format the row...
  20. M

    trouble with a do until loop

    ok so I've got this code which is aiming to work out the length of the first n collatz sequences. See: Collatz conjecture - Wikipedia, the free encyclopedia Essentially for a given integer x, the sequence is as follows: first term: x second term: if x is even, x/2, if x is odd, 3x+1 continue...

Some videos you may like

This Week's Hot Topics

Top