Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default what is the formula for adding a new number to the existing numbe.

A1=A1+B2 gives inconsistant results, is there another way to do this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default what is the formula for adding a new number to the existing numbe.

Inconsistant results? I find that hard to believe! This type of statement is
used heavily in VBA to self-increment a variable and has never failed me-
unless your code is not right!

--
|
+--Thief_
|


"jimb" wrote in message
...
A1=A1+B2 gives inconsistant results, is there another way to do this?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default what is the formula for adding a new number to the existing numbe.

Assuming that this is a line of vba code, you must keep in mind that
everytime you run through this line the results in cell A1 will be different !

Let's say that B2 contains the value of 10
and A1 contains 5

After running this code line, A1 will = 15
If it is run again BEFORE B2 changes, then A1 will = 25 and will increment
by 10 each run as long as something does not change B2

However, you may have something changing cell B2 in between incidents of
running the code. If so A1 will be increased by the value of B2 at the time
the code is run.

"jimb" wrote:

A1=A1+B2 gives inconsistant results, is there another way to do this?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding in an 'IF' to existing formula Jim Excel Discussion (Misc queries) 3 January 28th 10 09:24 AM
Adding to an existing formula JPS Excel Worksheet Functions 2 April 17th 08 04:04 PM
Adding selected numbe in a column Les Golf New Users to Excel 5 August 31st 06 04:04 AM
What is the formula for adding a number of days to an existing dat Ivan Excel Worksheet Functions 1 May 4th 05 03:00 AM
How can I cross reference phone numbers with existing phone numbe. John Excel Discussion (Misc queries) 1 February 11th 05 04:39 PM


All times are GMT +1. The time now is 10:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"