PDA

View Full Version : Sleeper: VBA % Calculation



yapmadhu
10-31-2008, 10:54 PM
Hai,

I am New to VB Macros .I attached One Sample along with this post. In the 13 th Column of the Sheet , I want to Calculate the Percent Value .

In the Sheet , It Deletes the Duplicate Value after Added the Value in the Column 3,5,7,9,11 and 13 . I want the Thirtenth Column asFollows

1) IF row 1 13 th column value is 10% and row 2, 13 th column value as 20 % , i want the Output as (10%+20%)/2 = 15 %

Can Anyone Modified that Sheet and Send me .

thanks

Aussiebear
10-31-2008, 11:27 PM
What have you tried to do so far?

yapmadhu
10-31-2008, 11:31 PM
i tried . But Didnt Get any Logic. Please Help me

georgiboy
11-01-2008, 01:39 AM
I have answered this in your other post!

Aussiebear
11-01-2008, 03:55 AM
Hai,

I am New to VB Macros .I attached One Sample along with this post. In the 13 th Column of the Sheet , I want to Calculate the Percent Value .

In the Sheet , It Deletes the Duplicate Value after Added the Value in the Column 3,5,7,9,11 and 13 . I want the Thirtenth Column asFollows

1) IF row 1 13 th column value is 10% and row 2, 13 th column value as 20 % , i want the Output as (10%+20%)/2 = 15 %

Can Anyone Modified that Sheet and Send me .

thanks
Is this before or after the duplication has been removed?
Are you sure that this needs to be a VBA requirement?


After reading your repeated posts, it seems that there is a language constraint here so pardon me if I take this opportunity to reiterate a couple of points for your consideration.

1) On a couple of occasions you have referred to VB, we use VBA (Visual Basic for Applications) for our code structure. A value within a cell or cells is not VB but a value.

2) There is a significant difference between what can and should happen at the Object layer. Microsoft has created a number of useful functions, all available to the user, and in your case formatting the column as "%" may well be all that is required. Coding through the VBE, allows the user to further personalise a workbook or worksheet. Asking for a vba solution to something readily available on the Object layer is simply trying to recreate the wheel when its not necessary.

3) In an attempt by you to arrive at a solution, you have created a number of posts, all based largely around the same issue. People have given you advice but you either seem to not recognise their assistance or you are unable to apply their examples. Allowing for your admittance that you are "new to Macros" I believe that you are possibly new to VBA, but lets stick with the "Macro's" for the moment. Do you know how to record a macro? Try recording a macro which formats a cell as a percentage. What does it tell you?

4) I have tried to clarify your requests within a number of threads, and at times I've asked you a direct question, but you have chosen to ignore them. The reason I've asked you is to try and determine what you have done yourself, to overcome these issues. Am I to assume you have done nothing?

5) Before responding to this, try to take some time and review the issues. Clarify in your own mind those challenges which are Object layer and those which are of a VBA nature. Try to construct your requests in such a manner, that those of us here wanting to assist you will be able to follow your thinking. For example, regarding the duplication of data, will it always only be one additional row of data? How was that additional row of data arrived at?

6) When attaching a workbook, please make sure that the data structure has no loopholes. Your workbooks presented to date differ in structure and data content. And more importantly sections of code differ significantly as well. Please leave all relevant code attached, so that those who provide code for you can see the whole picture.

When you are ready to proceed please be aware that there are some people here who have already passed you over, because of the methodology that you are using to date.