Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8711861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:59:21+00:00 2026-06-13T04:59:21+00:00

I am writing my first macro and have a question on how I can

  • 0

I am writing my first macro and have a question on how I can select a specific Row based on a value in a specific column. here is my code so far:

Sub Pipeline()

'Module 3
'Iterating through the Funding Date Column and looking for clients going live within 30 days
'Selecting the rows for each client in that target range
'TODO: Export information into an email template in Outlook
'TODO: Send email to distribution list


Dim fundingDate As range
Set fundingDate = range("M4:M500")

Dim todaysDate As Date
todaysDate = Date

For Each cell In fundingDate
  If cell < todaysDate + 30 Then
   'Need to select the entire row
  Else
  cell.Font.ColorIndex = 3
End If
Next

End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:59:22+00:00Added an answer on June 13, 2026 at 4:59 am

    replace 'Need to select the entire row with

    cell.entirerow.select

    UPDATE
    Here is a much more efficient way to get what you need without all the looping.

    In your code Replace from For Each cell ... to Next with this:

    With fundingDate    
        .AutoFilter 1, "<" & todaysDate + 30        
        .SpecialCells(xlCellTypeVisible).Select 
        'here are your clients going live in next 30 days    
        .AutoFilterMode = False    
    End With
    

    You may need to provide some error checking in case you don’t have clients going live within 30 days (SpecialCells method will fail on this) and also, if M4 is not your column header, you may want to adjust how the range picks up the visible cells.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing my first FireFox extension and I have some questions. Maybe someone
I'm writing a macro, but because I'm working for first time in vb, I
I'm taking my first crack at writing some linux kernel code, and I'm hitting
I am writing my first little Access 2003 application. I have two queries that
i have a loop in a macro i'm writing of the following structure: there
I am writing my first android app and have very limited experience in parsing
I have a array with values based on a specific player and I want
Today is my first day writing Excel macro and I was given a task
I'm writing small php extension and have problem when building it. The code: PHP_RINIT_FUNCTION(pstat)
I'm writing a kiosk-like micro-browser which opens specific pages based on payload of specific

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.