Results 1 to 2 of 2

Thread: Help to create a macro

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2011
    Posts
    1

    Help to create a macro

    Hi,

    Im used to Excel but pretty new to VBA.

    I have a table with 4 columns. A, B, C and D.

    I wish to sum column C and D for different values in column A and B. And I would like to state these values everytime i activate the macro.

    Example

    column A = Salesperson, could be Johan, Kalle or Pelle
    Column B = District, could be USA, Sweden or England
    Column C = amount for each sale
    Column D= Net win for each sale.

    So when I run macro I would like to be asked to state Seller(one or more) and District (one or more). When declared Column C and D sums for these rows..

    got it?

    Very thankful for any kind of help

  2. #2
    Member chrisguk's Avatar
    Join Date
    Nov 2011
    Posts
    61

    Re: Help to create a macro

    Quote Originally Posted by natstrom View Post
    Hi,

    Im used to Excel but pretty new to VBA.

    I have a table with 4 columns. A, B, C and D.

    I wish to sum column C and D for different values in column A and B. And I would like to state these values everytime i activate the macro.

    Example

    column A = Salesperson, could be Johan, Kalle or Pelle
    Column B = District, could be USA, Sweden or England
    Column C = amount for each sale
    Column D= Net win for each sale.

    So when I run macro I would like to be asked to state Seller(one or more) and District (one or more). When declared Column C and D sums for these rows..

    got it?

    Very thankful for any kind of help
    It would help to know more about the function of the sheet to be honest. From what you have stated all I would do is have a dynamic formula to give me the desired results in may be a summary page.

    It all deoends on the amount of sellers and items you wish to sum. If you are able to post an example of your sheet here I can chuck something together for you?

Posting Permissions

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



Click Here to Expand Forum to Full Width