Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing from value to %

Status
Not open for further replies.

ADoozer

Programmer
Joined
Dec 15, 2002
Messages
3,487
Location
AU
i have imported a bunch of CSV files into an XLS file, im hoping there is a quick fix that wont involve VB/VBA.

there are 9 worksheets with this aproximate layout

Code:
   set1A set1B set1C   set2A set2B set2C   setnA setnB setnC
1  1000  2000  100     9999  8888  7777    xxxx  xxxx  xxxx
2  etc
3
...
n

anyway i want to change the set values from actual numbers to a percentage of the sum of setA,B,C

is there a quick solution to this problem that doesnt involve me reinventing the wheel and typing a whole bunch of loops?

If somethings hard to do, its not worth doing - Homer Simpson
 


Hi,

Please be specific regarding the results you wish to see and where you want to display it.

For instance, I don't see a SetA. I see Set1A, Set2A...SetnA. Are they all part of SetA? What is the value of n? Does n vary? This is the MS Office Forum. (We usually do not post VBA code solutions here. See VBA Visual Basic for Applications (Microsoft) Forum707.)

Please post a specific example along with the expected results.

Skip,

[glasses] [red]Be Advised![/red]
The band of elderly oriental musicians, known as Ground Cover, is, in reality...
Asian Jasmine![tongue]
 
I just inserted columns, wrote a simple formula then dragged it to all cells neccesary.
 
ADoozer,
Another manual way of getting your percentages is to use the Edit...Paste Special...Divide menu item to divide all the cells in a selection by a constant. This trick avoids the need for all the extra columns. To do this:
1) Sum your columns up. Putting the sums all in one row will be the most convenient place for the formulas
2) Copy those sums
3) Select some blank cells, then Edit...Paste Special...Values
4) Format the data and sums as percentage
5) Edit...Copy the cell containing the value of the sum of the first data set
6) Select the data cells in that data set
7) Edit...Paste Special...Divide
8) Repeat for each additional data set
9) Delete the row where you pasted the values of the sums

Brad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top