Algorithm For Addition (operation For Each ID)

Sep 25, 2009

Have an excel table with following data:
- ID
- number of bottles
- number of bottle crates (there are 20 bottles in one one bottle crate)

201688194000bottles
20168819200crates
2016883812000bottles
20168838600crates
201688396400bottles
20168839320crates
201688809000bottles
20168880600bottles
20168880480crates...................

I need to write a macro which will do this operation for each ID:

(bottles/20)-crates = x

and if "x" is not 0 then write down the value of "x".

There are two points I would like to point out:
- One ID may contain 3 or more rows (see 20168880)
- The macro will work with hundreds IDs so the algorithm should be fast (but it is not necessary)

View 3 Replies


ADVERTISEMENT

Make A Calculation(addition) And Use The Answer To Multiply Against Another Addition Calculation

Nov 19, 2008

make a calculation(addition) and use the answer to multiply against another addition calculation....

The sum of (Monday!A1:A4) multiplied by the sum of (Monday!B1:B4) plus (Tuesday!A1:A4) multiplied by the sum of (Tuesday!B1:B4) and so on.

View 2 Replies View Related

Custom Function For An Algorithm

Jan 28, 2009

This just a shot in the dark, but does anyone have a custom function that calculates the check digit for a cusip? http://en.wikipedia.org/wiki/CUSIP

The algorithm is listed above.

View 3 Replies View Related

Secret Santa Algorithm

Dec 4, 2007

Anyone have an excel sheet that automatically generates secret santa selections?

Or explain an algorithm so I can implement it on excel?

View 9 Replies View Related

Nearest Neighbour Algorithm With Vba

Feb 5, 2008

I am trying to solve the nearest neighbour algorithm with vba

For example, I have a table as the following

0 1 2 3 4 5 1
10
5
15
20
2 10

8
9
7
3 5...........

View 9 Replies View Related

Table Showing A Basic RSA Algorithm

Apr 8, 2008

I wonder could anyone help me with a problem i'm having, I have a table showing a basic RSA algorithm in excel, for example,

M 13 2197 19 8893887173 13 M
N 14 2744 5 788125 14 N

etc etc,

How the numbers are derived isn't important, what i want to do is create a visual basic form, to allow a user to input a letter, for example M in a text box, click a button, and then the 5 related digits are shown.

So the user inputs M into a text box clicks a button, then 13, 2197, 19, 8893887173 and 13 is output to 5 other text boxes.

View 9 Replies View Related

Math Algorithm To Solve Puzzles

May 30, 2006

Given a list of numbers and a list of 'allowable' operators, come up with a specific total. ("The numbers game" on countdown on BBC2.... ooooh Carol Voderman)
For example, given the numbers 1, 3, 4 and 5 with valid operators +, -, /, * come up with a solution equal to 15. All numbers must be used once only. Use operators as often as required. The specific example above was given to me and I personally think its not solvable (might be a practical joke). But I am wondering is it possible to prove this through assertions or develop an algorithm to solve such puzzles. I can get 14 and 16, but not 15....

View 8 Replies View Related

Algorithm To Sort An Array Of Data In Vba

Jun 4, 2007

Im looking for an algorithm to sort an array of data, deleting multiple values whithin the array and shifting the values down the array to leave no gaps. the crude set of loops i am currently using is:

For f = 0 To 100
For g = f + 1 To 100
If LineArray(g) = LineArray(f) Then LineArray(g) = ""
Next g
Next f

which does work and serves my purpose but is messy as it leaves blank gaps in the array.

View 2 Replies View Related

Sorting Algorithm Doesn't Sort As Needed

Dec 2, 2009

I have this module that is supposed to look in column A and if it sees duplicates it looks in column B (with the date) and erases the entire row where the date is older in column B. I am attaching a sample to better illustrate it.

The highlighted in yellow rows are were I have duplicates and I want the row where the date is in red border to remain.
The module I have so far erases the newer records instead of the older.

This is the file:
Sample sorting.xls

Here is the

View 3 Replies View Related

Speeding Up Macro Process (Graph Algorithm Stuff)

Jul 7, 2009

i'm working on floyd algorithm macro for a project,
problem is, the spreadsheet matrix is huge, it's a 1043 x 1043 spreadsheet
And this is taking wayyy too long, i've been waiting for almost 2 days already..
here's the file :
http://ifile.it/6v2j39f
(You start the macro using "run" command in "input" sheet)

So is there any way to speed it up?
Or if anyone got a supercomputer, could you help me process this? :p

I'm thinking about changing the 10^5 value into infinite value, but i can't find a way to display infinite value..

And here's some reference for Floyd's algorithm,
http://ifile.it/12p5zle

I have tried to split the algorithm to make it process one iteration at a time, but i've been waiting like 2 hours with no result,
and that's for 1 iteration, can't imagine how long it takes for 1043 iterations
You can do this by deleting the.

View 14 Replies View Related

Formula / Algorithm For Identifying Minor Changes In Text Strings?

Feb 17, 2012

I have a database of approximately 250000 email addresses and I would like to see if there is some way to use Excel to analyse the strings in order to identify potential 'non-unique' individuals.

For example, if I have the following email addresses:
12345@example.com
12346@example.com
12347@example.com
or
example1@example.com
example2@example.com
etc

Is there some way of extracting common text strings, lets say where there is a difference of 1 character / digit between strings (rather than alphabetising and searching manually)?

View 2 Replies View Related

Copy And Rename Sheet In One Operation

Jun 14, 2014

Is it possible to copy sheet and rename the copied sheet in one operation .... have a hidden worksheet that needs to be copied and given a variable name dependent on the work sheets that are already present.

View 4 Replies View Related

Data - Text To Columns Operation

Feb 21, 2008

I have an issue with the Data - Text to Columns operation.

I paste some data into a sheet that is comma delimeted. I have a macro that runs the Data - Text to Columns operation and then moves the data to another sheet.(The data I need to paste is coming from a non-Excel application.)

I then copy a second set of data to another sheet and when I paste it, it automatically does the Data - Text to Columns operation but I do not want it to. I have seen this several times before and when I am manually manipulating the data it isn't a problem. When I use macros to manipulate the data, I don't get the desired results because my macro includes this operation.

I have done a little testing and this issue doesn't seem to always present itself. How can I paste the data without Excel trying to out-think me and just leave the data in the comma delimeted format it is in when I paste? What causes this? Its seems like Excel is seeing similar data and "assuming" I want to perform the same operation I just performed.

View 9 Replies View Related

Display The Path Result From A Floyd Algorithm Matrix Output

Aug 8, 2009

I want to display the path result from a Floyd Algorithm matrix output..

You can download the excel file here : http://ifile.it/lw4tgic
It consists of 1044 nodes, and we need to find the path between 2 nodes for ALL pairs..

Now, to find the path between 2 nodes, we need to :
1. Find the resulting cell of corresponding 2 nodes (y to x = z)
2. Update the path with that value (y z x)
3. For all the direct pairs in the current path (yz, zx), find the resulting cell
4. If destination (x) not the same with result (z) then repeat step 1 for that pairs.
5. repeat until x = z for all pairs.

Maybe it's better if i use an example....
we'll use T01 to E78 as an example

T01-E78 = if you look in the table,
y (vertical) = T01,
x (horizontal) = E78
z (result) = E77, so

T01-E78 = E77, so path = T01-E77-E78

check if result of T01-E77 = E77 (x = z?)...........................

View 10 Replies View Related

Fill Each Hour Train Operation With Excel?

May 15, 2014

I have two tables excel: Table1 and Table2, as shown in the attachment below. I wish that: in Table 2 to be filled in each cell how many hours (eg. 0.166 hours) worked every train. There is an Excel function to look in Table 1, reading time intervals and automatically fill them in each cell of Table 2?

View 8 Replies View Related

Excel 2010 :: How To Create Automatic Operation

Jan 6, 2014

I am not too sure what this is called but I am using Excel 2010 and need particular document that I use repeatedly. Basically, if a particular cell in the document does not contain a phrase then I want Excel to automatically change the text in that cell to bold and red and 2 other cells in Excel to bold and red as well. For more information, the cell is 19–20 and K–O and the phrase in the cell is "No Inconsistency".

So if "No Inconsistency" is not found in that cell then it automatically changes the text in that cell to bold and red, and it also changes two other cells that are found in that document to bold and red as well. The coordinates of those two other cells are 19 with H–J, and the other one is 17 with H.

View 2 Replies View Related

Excel 2007 :: Divide Operation Executes More Than Once

Mar 12, 2012

Using Excel 2007.

My vba code seems to be dividing a range by 1M more than 1 time

My initial value is 51543942

After by code runs the display is 0.00 MB and the value in the formula bar is 0.000000000051543942 or 5.15439E-11

I would like the final display to be 51.54 MB

what I might be doing wrong?

Code:
'Format columns
r = .Cells(Rows.Count, 1).End(xlUp).Row
Set rng = .Range("C2:C" & r)
.Range("IV1").Value = 1000000
.Range("IV1").Copy

[code].....

View 8 Replies View Related

Error :: 'operation Is Not Allowed When The Object Is Closed

Jul 28, 2009

I keep getting an error in this code while trying to write the results of a query to a sheet in the current workbook. The error i get is 'operation is not allowed when the object is closed'... since i didnt close the recordset before trying to write the results to the worksheet, im at a loss to explain why im erroring...


Public Sub fillWorksheetWithData(dataSheet As Worksheet, conStr As String, sqlStr As String)
'clear datasheet
LastRow = dataSheet.Range("A65536").End(xlUp).Row
If (LastRow < 2) Then
LastRow = 2
End If
dataSheet.Range("A2:A" & LastRow).EntireRow.ClearContents

View 9 Replies View Related

Do Operation On All Sheets Except The First Sheet In The Book Every Time I Update It

Jun 5, 2007

I have a workbook that I would like the same operation on all sheets except the first sheet in the book every time I update it (which is once a week).

I get data (currency format) for all of my employees on a weekly basis. Unfortunately this data is shown as a negative number and I need to invert these values. (So I use the formula below)... but I have to do this manually for about 35 sheets and I figure I could automate this somehow with a macro. Here's what I do usually and what I would like the macro to do automatically:


I want to insert a column after column G.
I would like to enter the following formula into H2:

=IF(G4="u", "u", IF(G4

View 9 Replies View Related

Hyperlinks :: This Operation Has Been Canceled Due To Restrictions In Effect On This Computer

Mar 6, 2010

while trying to view a hyperlink i just created in a cell within a worksheet, a message popped up saying:

mircosoft office excell:

X this operation has been canceled due to restrictions in effect on this computer. Please contact your system administrator.

View 9 Replies View Related

Hide Workbook Opening/closing Operation On The Screen

Jul 6, 2007

I am running a script that populates about 70 or so workbooks based on information from the database. Naturally this script is quite slow but what seems to take the most time is opening and closing workbooks. Is there a way to "hide" the workbook opening/closing operation on the screen? I have tried using the

Application. ScreenUpdating = False

this sped the code up but you still see the workbooks opening on the screen.

View 2 Replies View Related

Excel 2003 :: Perform Operation Variable Number Of Times?

Jan 29, 2014

I would like to perform a sum of randomly generated numbers between 0 and 6, but I want the number of independent random numbers to be dependent on another cell. I have =SUM(RANDBETWEEN(0,6) and then I get stuck. Is there a way to perform the RANDBETWEEN(0,6) a number of times stated in another cell? In this case that value is 67 but it will vary from around 5 to 150. I think there is a way to do this with macros, but I am not versed in visual basic. I am using Excel 2003.

View 2 Replies View Related

Addition Of Cells

Feb 8, 2007

I wanted to have the weeks of the month down one column = 52 week.

down the next column I have different amounts of money in that week.

some months have 4 weeks and other have 5. I wanted a program to say:

If you see a month "x" look at the next column and take that amount. Then on the next row you have month "x" again (week 2) go to the next column and take that amount and add it to week one. And so on until all 4/5 week are added to give on result.

Then the same for the next month...
month amount/week amount/month
05-Mar 0
12-Mar 70
19-Mar 210
26-Mar 350 1050
02-Apr 420
09-Apr 455......

View 9 Replies View Related

'Remote' Addition

Mar 16, 2009

I am hoping someone with excel experience can be of help to me with an unusual request for excel.

Assume cell A1 = 2, B1 = 3 and i wish the sum of this (5) to appear in cell C1. Very straight forward so far, however i wish the result to appear in C1 when i left click on a cell other than C1, say for example D7.

I can't use any macros for this.

View 11 Replies View Related

Sumproduct - Addition By Name

Jun 11, 2009

I need to C8 - C19 only to add up jobs won by andrew (in current orders). It needs to be month specific. what i mean by that is I need the formula to do what its doing now (adding up the jobs by and putting the totals into the according cell depending on what month they were won.

View 2 Replies View Related

Addition In Base 6

Jun 14, 2009

I've got a column of numbers that represent the number of overs bowled in games of cricket. Whilst these are whole numbers (eg. 34 overs + 34 overs) the addition isn't a problem, but when they are incomplete overs (eg. 34.4 overs + 34.5 overs) then the addition if out of kilter as it sums them in base 10, and not in base 6. (As there are six balls in an over, not ten for anyone who doesn't know!)

View 2 Replies View Related

Vlookup & Addition

Dec 28, 2009

I have multiple ranges in a spread sheet. I am trying to write a formula that will go out to each range in succession and look for a part number, upon finding return a quantity and them move on to the next range duplicating the above process. The formula should tally the grand total of all numbers found. I have it working except that not all of my items are in all ranges. If the item that I am searching for is in all ranges my formula works but if there is one or more of the ranges that doesn't have that particular value it returns an #n/a instead of totalling those that do have it. If I use a true instead of false in my [range_lookup] I get an incorrect answer. My formula for a given cell is listed below. This is with the true argument which does not work....

View 9 Replies View Related

Addition Formula

Aug 13, 2008

I am a new excel user. I a trying to write a certain formula but am having trouble. I want to write the formula to add a column of numbers, say H-10 through H-15. Each cell will have a number in it, but I want only to add the cells if the cell precedding it in the G-10 through G-15 Collumn is blank. For example if cells G-12 and G-14 have an "X" in them, then I do not want Cells H-12 and H-14 to be added. I only want the formula to add cells H-10,H-11,H-13, and H-15. I used just 6 cells for example, the column of cells to be added will be a lot longer.

View 3 Replies View Related

Multiplication/addition Function

Jan 27, 2009

I obviously know less about functions than I thought I did. I've got the attached spreadsheet set up except getting totals at the bottom. The production total L44, would be column A multiplied by the quantity entered in columns L and summed. Same for Total SF, square footage in column B times quantity in L and summed at the bottom. This would continue daily, needing sums under each column.

View 4 Replies View Related

Insert Addition Formula With VBA

Jan 11, 2013

I wish to sum specific rows in a spreadsheet as a Grand Total. I eventually end up with a string variable called "GrandTot" that holds "=C3+C13+C25+C31+C39+C50+C53"

This formula is correct, but when I insert it into the spreadsheet it totals zero. Only when I manually write the formula does it recognize the cells it supposed to add. I am very confused as to why this is happening.

On a possibly related note, when I highlight a column in the spreadsheet, the count is including blank cells.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved