+ Reply to Thread
Results 1 to 5 of 5

Help with finding column number using month and shape number

  1. #1
    Registered User
    Join Date
    07-01-2018
    Location
    Houston, TX.
    MS-Off Ver
    Office 365
    Posts
    93

    Post Help with finding column number using month and shape number

    I have 12 sheets where;
    Sheet1(Jan)
    Sheet2(Feb)
    ...
    Sheet12(Dec)

    each Sheet has 6 shapes with the name lblIncome1 - lblIncome6

    also is a Sheet13(Income) that holds the data for my 6 incomes per month,

    Jan1 Income starts at column 1
    Jan2 Income starts at column 4
    Jan3 Income starts at column 7
    ...
    Jan6 Income starts at column 16

    Then Feb, Mar... Dec
    I use the column numbers when saving and returning values for that Income. I can get the shape number that was pressed but need assistance with developing the math that will get me the correct column number. example; lblIncome1 pressed on Sheet2(Feb) should be 19. Assistant would be greatly appreciated.

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Help with finding column number using month and shape number

    You would be better attaching a sample of your workbook.

    Go Advanced -> Manage Attachments -> Upload

  3. #3
    Registered User
    Join Date
    07-01-2018
    Location
    Houston, TX.
    MS-Off Ver
    Office 365
    Posts
    93

    Re: Help with finding column number using month and shape number

    Be glad to, it will be tomorrow am,

  4. #4
    Registered User
    Join Date
    07-01-2018
    Location
    Houston, TX.
    MS-Off Ver
    Office 365
    Posts
    93

    Re: Help with finding column number using month and shape number

    moving from ActiveX controls to Form Controls, and having issues passing variables, so I chose to eliminate passing and just call the sub
    needed, doing the calculations or logic in the sub. The Income Shapes are the last piece I need to complete before moving on to other
    details. With ActiveX controls I just passed the var. as needed, the Form control doesn't like passing without throwing an error on
    1st. mouse click.

    Moving to Form Controls has been a blessing and a challenge at the same time, the size of my WB has been reduced more than half,
    speed went from 34 seconds to almost nothing.

    you will find the column number being passed where you call the macro from, and in module Income/Sub FormIncomeShow I have commented out
    the calling sub - GetiColumn while testing. I will edit the Shape Assign Macro when working. Thanks in advance
    Last edited by dad812; 01-22-2019 at 08:47 PM.

  5. #5
    Registered User
    Join Date
    07-01-2018
    Location
    Houston, TX.
    MS-Off Ver
    Office 365
    Posts
    93

    Re: Help with finding column number using month and shape number

    Thanks for the help, I have solved this myself;

    using the WorksheetFunction Match

    Please Login or Register  to view this content.

+ 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. Replies: 3
    Last Post: 07-14-2015, 12:26 PM
  2. Finding number in string and converting to Month
    By dchubbock in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-26-2015, 08:18 AM
  3. Replies: 4
    Last Post: 02-19-2013, 02:19 PM
  4. [SOLVED] Finding the number of days a range contains within a month
    By britt@wjg in forum Excel General
    Replies: 8
    Last Post: 05-17-2012, 04:02 PM
  5. Replies: 3
    Last Post: 12-13-2011, 02:39 PM
  6. Finding the Serial Number of the Last Day of the Month
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-23-2005, 11:56 AM
  7. Finding the Number of Days in a Given Month
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-23-2005, 11:55 AM

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