+ Reply to Thread
Results 1 to 12 of 12

Flag value in col d based on value in col b

Hybrid View

  1. #1
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Flag value in col d based on value in col b

    Sub checkb()
    
    Dim ws As Worksheet 'to set worksheet
    Dim lr As Long 'to find last used row in column B (assuming you want to check only cells with data
    Dim i As Long
    
    For Each ws In ActiveWorkbook.Worksheets
        ws.Activate
        MsgBox ws.Name
        lr = ws.Range("B" & Rows.Count).End(xlUp).Row
        For i = 1 To lr 'change 1 to the first row of data you wish to check
            If ws.Range("B" & i).Value < 30 Then ws.Range("D" & i).NumberFormat = "$#,##0.00"
        Next i
    Next ws
    
    End Sub
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  2. #2
    Registered User
    Join Date
    09-21-2011
    Location
    NJ
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Flag value in col d based on value in col b

    Hi Arkadi,
    Something's not working through correctly, does not step through each row on the active sheet. Thanks--I'll spend some more time with this.

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Flag value in col d based on value in col b

    Works on my end, but it only works through rows where b is not blank.
    Let me know if and when I can help more

+ 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. How to flag list of cities based on continent?
    By bristly in forum Excel General
    Replies: 6
    Last Post: 05-28-2013, 07:54 AM
  2. [SOLVED] Sum top 5 values based based on flag value
    By Snoopy2003 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-08-2012, 10:27 AM
  3. Update One Spreadsheet from several others based on a Flag
    By kpierce in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2011, 10:28 PM
  4. flag 2-3 smallest numbers based on 2 columns
    By alizok in forum Excel General
    Replies: 7
    Last Post: 03-13-2008, 01:06 PM
  5. [SOLVED] Creating a Flag based on cell value
    By Dan G. in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-04-2006, 03:50 PM

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