PDA

View Full Version : Question about vba programming



White_wolf17
07-13-2011, 01:38 AM
Hey guys,

I am very new to vba, in fact I only heard about it yesterday and I would simply like to use it to do a long series of calculations for me.

I have three columns in my excel spread sheet, the A column has letters B or S in, the next column B, has cells that contains quantities of items and column C has the corresponding amount that each item costs for that particular row.

What I am trying to do is to write code that goes down the spread sheet doing quantity * price and then giving that a negative number if B is in the A column for that particular row, or a positive value if S is in the column for that particular row. And then finally adds up these calculated numbers and gives me the result in £ in a message box.

Is this even possible or is it too complicated? If anyone could help Id' really appreciate it.

Bob Phillips
07-13-2011, 07:52 AM
Why not just use formulae?

Rayman
07-13-2011, 08:12 AM
Try the attached file