+ Reply to Thread
Results 1 to 4 of 4

Loop to check cell formats and values

  1. #1
    Registered User
    Join Date
    04-20-2015
    Location
    England
    MS-Off Ver
    2010
    Posts
    2

    Loop to check cell formats and values

    Hi

    I need to create a loop to check if a cell is Italic and if so if the value is less than 5. If excel finds this in a specified range (in the attachment columns H -> end), I need it to copy the entire row, paste it on a new page, then continue from the next row.

    I've added a sample of the data it needs to check.... but I'm lost as to how to start. any help would be appreciated!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Loop to check cell formats and values

    This takes a bit of time because it is a brute force approach (about 15 seconds on my machine). I got 112 rows copied upon completion.

    Just be sure ws1 and ws2 in the first couple lines of code match the names of your desired input and output sheets, respectively.

    And to change the column that it starts to look at, change the j = 8 to whatever column number you want (Column H is the 8th column, per your original post).

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-20-2015
    Location
    England
    MS-Off Ver
    2010
    Posts
    2

    Re: Loop to check cell formats and values

    I had to also change OpenRow to 3 so it starts below some column headers I have on the new sheet, but otherwise this seems to work great thanks!

  4. #4
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Loop to check cell formats and values

    You're welcome, and thanks for the reputation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Check for negative values and paste text (without using loop)
    By kaptenstofil in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2014, 06:15 AM
  2. VBA check values from range with loop
    By Tosters in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 12-11-2013, 06:15 PM
  3. [SOLVED] Loop through column check for colored cell and copy that cell to cells below it.
    By RENCE19 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-15-2013, 04:51 AM
  4. Loop to add up values of selected check boxes
    By lbi in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-31-2013, 12:42 PM
  5. Loop with Paste Special Values, Formats but no Borders
    By John Vieren in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-04-2012, 10:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1