+ Reply to Thread
Results 1 to 10 of 10

VBA Beginner needs help with project

  1. #1
    Registered User
    Join Date
    01-30-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    9

    VBA Beginner needs help with project

    Hi All,

    I've just started learning VBA as I've learned there is whole new take to Excel. At a good time really as i'm working on a little project for work, but I need something writing as there is no formula I can use for what I need.

    So here goes.

    I will be re-using the same workbook over and over again each week, (it's a weekly sheet)
    A1:A10 are cells that can contain any of the following but only one of:
    any number between 0 - 9
    "H8", "H4", "H6"
    "S8", "S4", "S6"
    "A8", "A4", "A6"
    "MAT8", "MAT4", "MAT6"

    I need A13 to total all, if any, "H8", "H4", "H6" but just the number's.
    A14 to total all, if any, "S8", "S4", "S6" but just the number's.
    A15 to total all, if any, "A8", "A4", "A6" but just the number's.
    A16 to total all, if any, "MAT8", "MAT4", "MAT6" but just the number's.

    Can somebody help me with this please?

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: VBA Beginner needs help with project

    Can you post a sample workbook showing some samples of what results you'd expect for example inputs? Currently I can't see why some SUMIF formulas wouldn't do what you need.
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    01-30-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: VBA Beginner needs help with project

    EXCEL FORUM.xlsx

    This is an example of what I'm trying to do. Although these cells aren't always what they are now they can change to anything so I need it to pick up what is in the cell at the time.

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: VBA Beginner needs help with project

    And what results would you expect, and where, for that sample data?

  5. #5
    Registered User
    Join Date
    01-30-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: VBA Beginner needs help with project

    The cells in A12:16 in the sample are the results that I would like to achieve.

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: VBA Beginner needs help with project

    OK - here's one way.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-30-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    9
    Quote Originally Posted by romperstomper View Post
    OK - here's one way.
    Unfortunatly the formulas dont work when i transfer them over to the actual spreadsheet, even though the arguememts look right and its the same principal. I just get #VALUE.

  8. #8
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: VBA Beginner needs help with project

    You'll need to give better sample data then, I think. Does the real data always end with one digit?

  9. #9
    Registered User
    Join Date
    01-30-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: VBA Beginner needs help with project

    Excel Forum 2.xlsx

    Here's a sample of the sheet I'm using in the same format. I've included notes on the attachment too. Thanks for your help. I really appreciate it.

    the formulas on the baove did work, now I've had chance to play about with them but there has to be a number in every single cell in the range. Is there a way modify it into maybe an IF there is a number in the cells as there sometimes isnt a number in them.
    Last edited by Russmeister57; 09-06-2015 at 10:45 AM.

  10. #10
    Registered User
    Join Date
    01-30-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: VBA Beginner needs help with project

    Doesnt matter, i have made them work for me now. Thank you so much for your help i got there eventually.

+ 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: 5
    Last Post: 08-06-2014, 01:10 PM
  2. Replies: 1
    Last Post: 05-02-2014, 03:05 PM
  3. [SOLVED] Function that concatenates multiple sub-project descriptions based on project code
    By markbpi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-28-2012, 06:49 PM
  4. [SOLVED] Insert Blank Rows between sorted projects, Subtotal project to the right of final project.
    By ZAC7 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-07-2012, 04:08 AM
  5. VBA Project and Modules Remain in Project Explorer after workbook closed
    By avr5iron in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 03-09-2012, 11:38 AM
  6. Replies: 1
    Last Post: 10-18-2005, 11:05 AM
  7. [SOLVED] Beginner needs help w/first work project
    By Buckwheat in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-12-2005, 04:06 PM

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