Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Excel Related-calculation on table

Status
Not open for further replies.

adeel.sid

Advanced Member level 4
Joined
Feb 15, 2008
Messages
108
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,298
Activity points
1,958
How can I divide every number of my 6x6 (or matrix of any order) by two.
I used 'grouping' but it select either row or Column field at a time.
Remeber I am not asking about Pivot table

Any Suggestions may lead towards result.
Regards
Sid
 

Store the excel file in a comma separated values (CSV) format, say, in X.csv.

I wrote a quick script for you.

Code:
set $wsep = ","
var string in_table, out_table ; cat "X.csv" > $in_table
while ($in_table <> "")
do
    var string row ; lex -e "1" $in_table > $row ;
    while ($row <> "")
    do
        var string column ; wex -e "1" $row > $column
        echo makestr( int( makeint(str($column))/2 ) ) >> $out_table
        echo "," >> $out_table
    done
    echo "\n" >> $out_table
done
echo $out_table > X.csv

The script is in biterscripting. (If you don't have it already, install from https://www.biterscripting.com/install.html. It's free.) Save the script in C:/Scripts/divide.txt. Start biterscripting. Execute
the following command.

Code:
script divide.txt

That's it.

Randi
(I do a lot of spread sheet manipulation using bscripting. If you need more help, email me.)
 

I am not sure exaclty what you want to achieve.

The easiest way (if I understand you correctly) is as follows:

Let us assume your table is in A1 to F6. Enter the following formula "=A1/2" in cell H1 and copy it from cells H1 to M6. Excel will automatically increments the row and column references in each of the target cells.


Alternatively you can use an "Array formula".

1. Highlight the range A8:F13 (where the result will be)
2. enter in the formula bar (at the top) the equal character =
3. then using the mouse, block the range A1:F6
4. continue entering /2 on the formula bar, which is obviously the divide by two that you want.
5. Then enter simultaneoulsy Ctrl Shift and Enter

and all 36 cells will be filled in.

I suppose this would be an opportune time to mention my book:
"Excel by Example: A Microsoft Excel Cookbook for Electronics Engineers" published by Newnes/Elsevier

ISBN 0750677562

-Aubrey
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top