How to sum numbers with multiple criteria

onmine

New Member
Joined
Apr 16, 2017
Messages
1
Hi,
I'm trying to sum numbers with multiple criteria.

To prevent the number of columns from increasing,
I've written the information in one cell.


Column1 Column2
Project1 P3(2)
Project2 P6(4)
Project3 L5(2)

Then, I want to sum numbers
(1)seperating the numbers in parentheses from the numbers outside, andd
(2)depending on wht the preceding letter(P/L/F) is.

The results I want are shown below.

Column1 Column2
Project1 P3(2)
Project2 P6(4)
Project3 L5(2)
P(Goal) 9
P(Performance) 6
L(Goal) 5
L(Performance) 2


Please help me make vba code for this work.
 

Some videos you may like

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

FDibbins

Well-known Member
Joined
Feb 16, 2013
Messages
6,723
Any time you combine numbers and text, you end up with text, not a number/value, and you cannot add text. I suggest that you try and slip the numbers from the text, and then run your calcs based on that
 

Forum statistics

Threads
1,089,498
Messages
5,408,649
Members
403,222
Latest member
ExcelAdv

This Week's Hot Topics

  • help please
    SORRY NOT ANY GOOD AT EXCEL SO HELP WOULD BE MUCH APPRECIATED this formula is in a sheet called ignore...
  • two formulas needed
    Hello, I'll try my best to explain this: First formula needed in Sheet1 cell A2: If Sheet1 cell B2 = Sheet2 cell B2 then return a 1. If not then...
  • Dynamic Counts
    Good afternoon, we are tidying up some data & the data seems to be growing quicker than we are tidying it up! What we confirm (by reviewing it...
  • Help Excel formula eliminate duplicate values and keep only 2 identical rows.
    as picture below column A has a duplicate value. but the values are not the same as the rule. sometimes 4 rows, sometimes 10 rows or 7 or 9...
  • Macro Compile Error Sub or Function not defined
    Hello, I am trying to run macros from a validation list, all macros have been created and run perfectly on there own but I'm getting a compile...
  • Last row combined with Current Region VBA
    I'm generally happy finding the last row of data through something like Lastrow = Cells(Rows.Count, "D").End(xlUp) but I don't always receive data...
Top