return the value of cells and not the formula

C

crombey

in cells(1,5) there is a formula [=Recherche(A4;B5:B15;C5:C15)]whitch ha
s a string value "bonjour"

sub()
nom(10) as string

nom(i)= cells(1,5)
end sub

The sub fails and doesn't return the value "bonjour"
I use nom(i) to sort values later in the programm


I have tried to use
nom(i)= cells(1.5).value
but I fail because it's a string variable

Thanks to help me

(e-mail address removed)


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Article poste via Voila News - http://www.news.voila.fr
Le : Wed May 26 22:37:26 2004 depuis l'IP : 80.8.64.103 [VIP 381397376091]
 
F

Frank Kabel

Hi
how is i defined?

--
Regards
Frank Kabel
Frankfurt, Germany

crombey said:
in cells(1,5) there is a formula [=Recherche(A4;B5:B15;C5:C15)]whitch ha
s a string value "bonjour"

sub()
nom(10) as string

nom(i)= cells(1,5)
end sub

The sub fails and doesn't return the value "bonjour"
I use nom(i) to sort values later in the programm


I have tried to use
nom(i)= cells(1.5).value
but I fail because it's a string variable

Thanks to help me

(e-mail address removed)


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Article poste via Voila News - http://www.news.voila.fr
Le : Wed May 26 22:37:26 2004 depuis l'IP : 80.8.64.103 [VIP
381397376091]
 
C

crombey alain

i is defined as integer (it's index)

nom=cells(4,12)
if the content of cells(4,12) is a formula i would like to have the
value of the formula ("bonjour" for instance)

i have tried
nom=cells(4,12).value
i have tried
nom=cells(4,12).values
i have tried
nom=cells(4.12).value2
I think i don't use the whright syntax


Thank you for your help
please answer to email (e-mail address removed)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
F

Frank Kabel

Hi
normally the following should work:

sub foo()
dim nom
nom=activesheet.cells(4,12).value
msgbox nom
end sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top