+ Reply to Thread
Results 1 to 3 of 3

picking some data from a column

  1. #1
    Registered User
    Join Date
    07-25-2005
    Posts
    3

    picking some data from a column

    Hi, i'm trying to run some reports on an automatically generated worksheet from our company database.

    Unfortunately, the data is formatted in columns something like:

    Column Title
    10
    8
    12
    5
    15
    ...
    11
    9
    10

    The data in bold is actually the lifetime average value for the data in the columns. I just need to run simple countif macros on the nonbolded data, is there an easy way to grab just the data I want? I'm kinda new to vba and excel and havn't been given much time to read up on things so my apologies if this is obvious.

  2. #2
    STEVE BELL
    Guest

    Re: picking some data from a column

    You might try this

    Dim x as Long, cel as Range

    x = 0

    For each cel in Range("A1:A250") ' <<< set to your range (this could be a
    variable)
    If cel.Font.Bold = False then
    x = x+1
    End If
    Next

    Msgbox "The count is: " & x


    To avoid blank cells use:

    If cel.Font.Bold = False And Len(cel) > 0 then

    --
    steveB

    Remove "AYN" from email to respond
    "guenter" <guenter.1sqlz1_1122314799.1335@excelforum-nospam.com> wrote in
    message news:guenter.1sqlz1_1122314799.1335@excelforum-nospam.com...
    >
    > Hi, i'm trying to run some reports on an automatically generated
    > worksheet from our company database.
    >
    > Unfortunately, the data is formatted in columns something like:
    >
    > Column Title
    > 10
    > 8
    > 12
    > 5
    > 15
    > ..
    > 11
    > 9
    > 10
    >
    > The data in bold is actually the lifetime average value for the data in
    > the columns. I just need to run simple countif macros on the nonbolded
    > data, is there an easy way to grab just the data I want? I'm kinda new
    > to vba and excel and havn't been given much time to read up on things
    > so my apologies if this is obvious.
    >
    >
    > --
    > guenter
    > ------------------------------------------------------------------------
    > guenter's Profile:
    > http://www.excelforum.com/member.php...o&userid=25562
    > View this thread: http://www.excelforum.com/showthread...hreadid=389952
    >




  3. #3
    Registered User
    Join Date
    07-25-2005
    Posts
    3
    Thank you very much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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