loop code in column

  1. W

    VBA Replace values help

    Hi there, I want to fill in the blank cells in between two designated text strings. I column L, I have either blank cells or the words "DNIS:ARC" or "DNIS". I need the replace the only the blank cells between "DNIS:ARC" and "DNIS" with the word "ARC" all the way through the data set in column...
  2. M

    Challenging: VBA to Combine (1) Naming Ranges with Another Range's Values; (2) Row & Column Loops; (Finding Last Row/Column)

    I have a lot of ranges I need to name. I want to use VBA to name every range in a column by referencing another column that contains the range names to be used. For instance, I want to name cell E3 (which has a value of 1) with the name in cell A3 (JillJan). Then, name cell E4 (which has a...
  3. C

    Excel or VBA code to compare variable against column of figures & perform a function

    Hi All Take a look at the example table below. <tbody> Row Age Age Multiple 1 17 0.8 2 20 1.0 3 25 1.15 4 35 1.20 5 50 1.22 6 70 1.23 </tbody> <tbody> Age x Age x Age Multiple ? </tbody> If I have a variable "Age" on the sheet (populated from a UserForm) I need excel to...
  4. S

    Loop 2 Ranges - "Invalid Next Control Variable Reference"

    In layman terms, what I'm trying to do: If "V2" = "A2" then "V2" = "True" Else "V2" = "False" Then proceeding to the next row in both ranges, all the way to the bottom of the data set. Sub Step6() Dim mycell As Range Dim myrange As Range For Each mycell In Range("V2", Range("V"...
  5. J

    optimizing vba looping code

    Sub Testingloop() Dim endrown As String Dim ex As String Dim ez As String Dim eh As String Dim eg As String Dim el As String Dim ee As String Dim es As String Dim ef As String Dim ei As String Dim i As Integer Dim LastRowColumnA As Long: LastRowColumnA = Sheets("looping").Cells(Rows.Count...
  6. R

    Loop through Columns, and if they contain "YES, do a function, otherwise next Column

    Hi Everyone, I am looking for VBA code which will loop through columns J:W. If the given column contains the text "YES", then I would like to filter that column and copy the data into another sheet called "Numbers" Otherwise I would like to loop onto the next column and do the same action...
  7. S

    Easier way converting text to columns using VBA. I'm a VBA beginner.

    Hello everyone, I'm running this code to convert a range of columns (from personal.xlsb). The reason for using this code is that it only converts numbers to text and doesn't change for example dates. It works but there has to be another way to let the code loop or run until the last filled...
  8. S

    How to run IF function in a loop or any other solutions?

    I want to refer to the last date of the data set and make the cell value move UP until cell value is equal to text or in this case "BRL" If it is text, I want excel to run the formula in BLUE, otherwise I want excel to move up the column until it finds a text. =IF(ISTEXT(A9)...
  9. J

    how to make a loop that filters based on a table?

    A B C <tbody> Column Exclude Label 3 *9/1/2016* DONE 2 *342* NEXT 2 *423* NEXT 5 *MAE* RE 5 *RTX* VEN 5 *FES* VEN 7 *1232* MR 7 *3212* MR 7 *4236* MR </tbody> Right now, I have that table on the front page. I would like to filter values based on the...
  10. J

    Filter and delete criteria with loop

    Sub GatherInfoHimchanLooping() Dim exclude As String Dim endrow As String: endrow = Sheets("Info").Range("E100").End(xlUp).Row Dim Finalrow As String: Finalrow = Sheets("Info").Range("I100").End(xlUp).Row For i = 24 To endrow exclude = Cells(i, 5).Value Sheets("Data").Select...
  11. M

    How should i write this loop?

    Hi there, I would like to write the following loop, could you give me some idea how to write it? I need the macro to copy columns with the same region in the mater workbook to another workbook. For example, the macro will copy the column A to C to a new workbook named EAST. then the macro...
  12. H

    How can this be looped??

    <tbody> 0down votefavorite Having a heck of a time looping this; D2 is where my list starts. I would like to have it ran for d3, d4, d5, d6.... until a blank space. This program searches for the name in Column D and if it finds it, it places it in Column E so that would need to also increase...
  13. A

    Consolidating test if value exists before consolidating data?

    Hi So basically I have a created a code which asks the user to pick a folder which it then consolidates those file which are in the folder to a master sheet from multiple excel file. I want the code to test if the file is already imported by referencing the data already on the master sheet...
  14. A

    Need help to find record

    I have a rather large Excel spreadsheet that I use for mail merges, etc., I also use it to get information from individual records for forms, letters, et al. I would like to be able go straight to a record(row) without having to read through all the records before it (In RPG you use logical...
  15. A

    VBA Add Borders to every column of Dynamic Selected Area

    Hi all, For every work assignment in Excel I have a specific format for presenting data. I add outside borders to the headings and to each column in a selected area. Sometimes it is just one "table" (I don't actually create an excel table, I just add formatting to raw data), and other times I...
  16. S

    Looping and Filtering in VBA

    Hi Everyone, I am sending out Outlook appointments via a spreadsheet where all the data/information is stored. However, the issue I am running into is: when I need to send out multiple information to the same email address for a client, I want the client to get all of the information in the...
  17. X

    Loop and Copy

    I'm new to VBA and struggling with what I think should be a simple 'For' loop! I have a set of data that when exported and opened in Excel gives a list of companies and dates of when an order has been placed. The data contains the company name in column A and date of order in column B. The...
  18. W

    VBA Question- Demand Analysis...How can I count activity by time of day?

    Excel 2010 <tbody> A B C 1 Customer Number In Date-Time Out Date-Time 2 1 9/3/2015 15:00 9/4/2015 15:36 3 2 9/3/2015 15:20 9/4/2015 9:45 4 3 9/5/2015 12:15 9/7/2015 15:59 5 4 9/5/2015 15:00 9/6/2015 15:03 6 5 9/7/2015 8:00 9/8/2015 18:09 7 6 9/7/2015 13:00 9/9/2015 13:36 8 7...
  19. C

    Loop through cells and copy cell contents to another worksheet

    Hi all, In need of some help as I'm a bit of a vba novice: I have a worksheets (entitled Summary 1, Summary 2, Summary 3 etc), I want to loop through the cells within each of the summary sheets and every time I come across a number, I want to copy that number into a new worksheet (entitled...
  20. H

    Select nth rows

    Hi, I would like to select the two first rows (cells) to set white font color and not the third (to keep black font color). This should be a loop to select enitre list. How should I do that? Sheets("PunktavvikHist").Range("BI58").Select Do While ActiveCell.Value <> ""...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top