functions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi,

is there a function that does this

if a1=1, if true a2=b1, if false a2 stays as it was (EITHER WITH A ZERO VALUE OR THE VALUE THAT MAY HAVE BEEN ENTER PREVIOUSLY FOR EXAMPLE
B2= 10
A1= 0 B1=0 B1 WILL BE INCREMENTED BY A MACRO
A1=10 B1=1
A1=10 B1=2

THOUGHT AN IF FUNCTION WITHOUT THE FALSE BIT WOULD WORK BUT IT DIDNT ALL IT GAVE ME WAS THE TEXT "FALSE"
 
Hi Carlos1973!

I'm afraid that you can't use functions to do other than return a
value to a cell.

Closest you'll get is:

A2:
=IF(A1=1,B1,0)

or:

A2:
=IF(A1=1,B1,C1)

You should however, be able to achieve what you want using a
subroutine but I think you need to get a clear statement of what you
want it to do in what circumstances before you start trying to code
it.
 
Hi Carlos.........
This formula , put in A2, will give you whatever is in B1, in A2, whenever
A1=1, otherwise A2 will read 0...........

=IF(A1=1,B1,0)

If instead of this, you are trying to get A2 to accumulate whatever is put
in B1, you will need VBA for that..........

Vaya con Dios,
Chuck, CABGx3


carlos1973 said:
hi,

is there a function that does this

if a1=1, if true a2=b1, if false a2 stays as it was (EITHER WITH A ZERO
VALUE OR THE VALUE THAT MAY HAVE BEEN ENTER PREVIOUSLY FOR EXAMPLE
B2= 10
A1= 0 B1=0 B1 WILL BE INCREMENTED BY A MACRO
A1=10 B1=1
A1=10 B1=2

THOUGHT AN IF FUNCTION WITHOUT THE FALSE BIT WOULD WORK BUT IT DIDNT ALL
IT GAVE ME WAS THE TEXT "FALSE"
 
thanks for the reply.

what im trying to do is this

i have a value in say b1 which changes but i need to transfer that value when if have entered all my data to 1 different cell so it can 1 be logged as the preivious value and 2 be used in further calculations
i then need to put the next figure inthe next box down without changing the first

i thought i could put a simple functon in each book which would look to see which revision of the workbook i was on and put the data in the correct box. i was planing on recording a short macro to increment the revision number and the date. the rest of the calcs would have been done automaticaly.

is there a way that a macro could say choose which cell my value went into??

cheers once again for your reply
 
Back
Top