Question

In EXCEL VBA: How would I manage to do this in VBA? The assignment is in...

In EXCEL VBA:

How would I manage to do this in VBA?
The assignment is in essence add the amount in one column based upon the what’s in one column. In more description:
Column A has a name, column B has random numbers in it, and column C has a price in USD. Some numbers in Column B are the same. For the cells that are the same in column B, I would add together the cells in column C. There are over 550 rows.

Example:
Column B: 100, 100, 54,32
Column C: $1,$3,$50,$18
Requested Output: Totals: $4, $50, $18
0 0
Add a comment Improve this question Transcribed image text
Answer #1

You Can use Subtotal Function in the Excel to get the total for the each same value in column B:

It can be done in the following step

1.Raw Data

2.Custom Sort the given data using ColumnB

All Values in Column B are Arranged According to their values

3.Now use Subtotal Function to add the same values in column b and get the subtotal of each same value.

it is in Data Attribute

Now use the sub total on column b and add the values in column c

After selecting subtotal we get the following output

Another Alternative you can try is sumif but not sure that it will work use the below formula not sure it will work

=IF(A2=A1,"",SUMIF(A:A,A2,B:B))

 
Add a comment
Know the answer?
Add Answer to:
In EXCEL VBA: How would I manage to do this in VBA? The assignment is in...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need some VBA(excel) help. This is what I was given: 'Review the attached data on...

    I need some VBA(excel) help. This is what I was given: 'Review the attached data on the 'Data worksheet'. The data represents the Sales Tax information for the 50-city States in US. 'Create two functions that computes the following for each state: 'StateTax: ListedPrice * State Tax Rate 'Local Tax Rate: ListedPrice * Local Tax rate 'Determine Sales Amount as: ListedPrice + StateTax + LocalTax 'TotalTax as StateTax + LocalTax 'DiscountOpportunity as: MINIMUM(ListPrice * 2%, SalesTax * 1.5%) These are...

  • how do I do this on excel?? Thanks in advance For this assignment, you are going...

    how do I do this on excel?? Thanks in advance For this assignment, you are going to put the information from the word document into excel and call the the file - "last name-first initial- PM (or AM)" You will be uploading your Excel file you will need to calculate labor by using a formula (the math is given to you), then using a link to that cell to put it into the piece price, and then using the sum...

  • Assignment 1 Create a monthly budget using Excel. Each of the rows should represent days in...

    Assignment 1 Create a monthly budget using Excel. Each of the rows should represent days in the month: 1st, 2nd, 3rd, etc. with the last row titled “Total.” Each of the columns should represent areas in which you spend money: groceries, restaurants, utilities, entertainment, school/work, car, shopping, misc., etc. At the bottom of each column on the Total row, use a SUM formula to add all of the rows for the whole month so that you can track your spending...

  • please answer in excel format and provide formulas. G E 84 C C Play Ode to...

    please answer in excel format and provide formulas. G E 84 C C Play Ode to Joy 2 Cick bere for a gcod time Sales for First Quarter 100% Sheetl Reatu Figure 5-28. Using the HYPERLINK function. COMPUTER EXERCISES We Love Plants, Inc. is a small company in the houseplant care business. People c for the company to come into their apartment or house to care for their plants when they a away on business or on vacation or all-year...

  • how would these questions be answered and what are the formulas to use in excel? The...

    how would these questions be answered and what are the formulas to use in excel? The 4 digit id is 6305 Step 24 of 40: Transaction #3 es Shareholder' s ity 2 Your turn: Transaction # 3 Nunya Business has received 25% of the amount you recorded in Transaction #2 as partial payment of Its accounts receivable. After you record this transaction: The amounts will be based on formulas in the worksheet cells, as opposed to numbers that you've calculated...

  • how would these questions be answered and what are the formulas to use in excel? Step...

    how would these questions be answered and what are the formulas to use in excel? Step 24 of 40: Transaction #3 es Shareholder' s ity 2 Your turn: Transaction # 3 Nunya Business has received 25% of the amount you recorded in Transaction #2 as partial payment of Its accounts receivable. After you record this transaction: The amounts will be based on formulas in the worksheet cells, as opposed to numbers that you've calculated outside of Excel and then manually...

  • Hello I was wondering how could I solve this excel assignment, since I never used Excel,...

    Hello I was wondering how could I solve this excel assignment, since I never used Excel, I have no clue how to begin and how to get the values and charts inputed into excel. Could I see an excel version on how I could do this? Please help, and thank you! Step Instructions Points Possible Use a cell reference or a single formula where appropriate in order to receive full credit. Do not copy and paste values or type values,...

  • Using Html 5: - You are to create a table consisting of 11 rows and 11...

    Using Html 5: - You are to create a table consisting of 11 rows and 11 columns. The table cells are to be 40 pixels wide, each row. The table is to also have a header row that spans across all columns and contains 'Multiplication Math' as the table name. - Alternating rows will have a different background color. - The table is to be centered in the HTML page. The top table row is to have the numbers 1-10...

  • I would prefer 34. being answered 33. For the big order database table, list FDs with...

    I would prefer 34. being answered 33. For the big order database table, list FDs with the column CustNo as the determinant that are not true due to the sample data. For each FD, identify the sample rows that contradict it. Remember that it takes two rows to contradict an FD. The sample data are repeated in Table 7-P4 for your reference Table 7-P4: Sample Data for the Big Order Database Table OrdNo temNo atyOrd PlantNo CustNo CustBa CustDisc ReordPt...

  • Can you solve the question CE 4-3. do not need to do #g & h. CE4-2....

    Can you solve the question CE 4-3. do not need to do #g & h. CE4-2. Create a new workbook and take the following actions: a. Name and save your workbook using your own choosing b. Enter the value This is the content of cell C7 into cell C7. a name of c. Use F2 to change the value in cell C7 to This is part of the content of cell C7 d. Add the value January to cells B2...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT