Results 1 to 1 of 1

Loop function to check and select data to be graphed

Threaded View

  1. #1
    Registered User
    Join Date
    03-11-2015
    Location
    Australia
    MS-Off Ver
    2007
    Posts
    1

    Loop function to check and select data to be graphed

    Hi all, I'm quite new to VBA so excuse me if I ask basics questions.

    I have a spreadsheet that have x number rows of data with Label in Column B A01, A02 and etc.
    I need to make separate graph based on the label

    What I want to do is to make a code to:
    1. Start with Row x, check if value in Bx=B (x+1) - Row to, so check B2=B3
    2. continue to go down row by row until it finds value in Bx<>B (x+1) - in this case it is B23<>B24
    3. Then i'd like to select column D, E, and N from the first row to the last row that has the same label value.

    ActiveWindow.SmallScroll Down:=20
    Range("D24:E45,N24:N45").Select
    Range("N24").Activate
    ActiveSheet.Shapes.AddChart.Select
    ActiveChart.SetSourceData Source:=Range( _
    "'East'!$D$24:$E$45,'East'!$N$24:$N$45")

    4. once its done I'll create a graph

    ActiveChart.ApplyChartTemplate ( _
    "C:\Users\wgw76sy\AppData\Roaming\Microsoft\Templates\Charts\bauxite bin wear rate.crtx" _
    )

    5. then I'd like loop the process for the whole worksheet.

    I'm sure there is a way to check instead of copy and paste code and changing the cell number one by one.
    could someone please help me?
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. formula for graphed exponential function
    By Simon H in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-28-2014, 04:39 AM
  2. Multiple Check boxes - how to select another worksheet using a single function
    By Skelvissie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-25-2011, 07:07 PM
  3. Using Combobox to change data being graphed
    By tehmonker in forum Excel General
    Replies: 1
    Last Post: 06-28-2010, 12:43 PM
  4. VBA Loop, And Check Function
    By lilanngel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-23-2010, 03:00 PM
  5. Link Graphed data to output cells.
    By lumo1985 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 05-29-2008, 04:22 AM

Tags for this Thread

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