for next

  1. N

    Issue with For Next and If Then statement

    I want to delete every row that does not have 28168-59 or 19062-59 in column B, except of course the header.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p> <o:p></o:p> This worked (another than the header part) before I added an OR with another part#, but...
  2. L

    Hold the value of a variable until something else happens

    hello! I'm basically trying to write a code to do the concatenate at column C: <TABLE style="WIDTH: 326pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=433 border=0><COLGROUP><COL style="WIDTH: 16pt; mso-width-source: userset; mso-width-alt: 768" width=21><COL style="WIDTH...
  3. B

    Using Sheet.Cells Property with a Range

    Hell All, So I would like to look through a range of cells on a sheet to check if they have numbers in them. Basically it is a sheet with 4 columns (A through D). And 10 rows (2 through 11). I would like to loop through all four columns, and check that same row range for each column. The...
  4. M

    subroutine to calculate the sum of numbers in a row

    ok im new to this wesite and a new user of VBA I have a column of numbers, that I don’t know the length in advance, but is located in column A. I want to write a subroutine that calculates the sum of the following <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p>...
  5. B

    Delete Cells If Does Not Equal Criteria

    Hi, Am writing a Sub that will delete all rows that do not contain 1 in Column B. So far i have Sub Macro14() Dim ws As Worksheet Set ws = ActiveSheet For i = ws.Range("B5").End(xlDown).End(xlUp).Row To 1 Step -1 If ws.Cells(i, 2) <> "1" Then ws.Rows(i).Delete End If...
  6. T

    For & next: what is the relationship

    Hello, I am new to writing VBA, can you tell me the basic relationship between for & next? in this example i don't uderstand why i am being told "for without next" If too busy to explain this, can you suggest somewhere i could read about it? Sub test() For i = 1 To i = 5000: For X =...
  7. N

    Going Loopy

    Hi all, struggling with concept of looping so could really do with your help My problem is this In one workbook I have a list (indeterminate number) of values which have been data sorted to group duplicates together. Eg JC000 JC001 JC001 JC001 JC002 JC002 In another workbook I hold a full...
  8. T

    Nested Loop Array

    I have a matrix composed of 6 rows and 15 columns. The top-leftmost cell is B5. The 15 columns is subdivided to 5 main headings, each heading composed of 3 columns. Column 1 is the Project Cost (in dollars) Column 2 is the Project name Column 3 is the Project Lagtime (in days) Each row...

Some videos you may like

This Week's Hot Topics

Top