Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Divide By Gives Whole Number (Excel 2003 VBA)

    Hello, wondering if someone can help on couple of things.

    What is the quickest way to find the column number for a column heading. I normally do while <> "Address" and use a counter. Is there a better way?

    Second I need to quick if a cell value divided by three is a whole number. Again what is the easiest way?

    Thanks is advance.

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Divide By Gives Whole Number (Excel 2003 VBA)

    Hi,
    You can use something like:
    <code>activesheet.rows(1).find("Address").column </code>
    You can use <code>If rngCell.Value Mod 3 = 0 then</code> to check the division by three.
    HTH
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

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