Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
RAP RAP is offline
external usenet poster
 
Posts: 49
Default Online reference available for x-fering functions into VB?

Hello, Folks

I'm fairly adept at developing answers to my problems using worksheet
functions as long as they're entered into cells. Getting the same
functionality while using VB is a whole new ball of wax for me. Is there an
on-line reference you can recommend for this? My reference books simply do
not address my needs.

Ex: How do I write VB script to nest the AND and IF worksheet functions?

Thank you,
Randy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Online reference available for x-fering functions into VB?

ActiveCell.Formula = "=If(AND(A1=""Snore"",B1=5),""House"",""Dog"") "

other than that, you wouldn't be nesting worksheet functions in VB.

Perhaps you can clarify your question if that isn't what you were looking
for.

--
Regards,
Tom Ogilvy

"RAP" wrote in message
...
Hello, Folks

I'm fairly adept at developing answers to my problems using worksheet
functions as long as they're entered into cells. Getting the same
functionality while using VB is a whole new ball of wax for me. Is there

an
on-line reference you can recommend for this? My reference books simply

do
not address my needs.

Ex: How do I write VB script to nest the AND and IF worksheet functions?

Thank you,
Randy



  #3   Report Post  
Posted to microsoft.public.excel.programming
RAP RAP is offline
external usenet poster
 
Posts: 49
Default Online reference available for x-fering functions into VB?

Tom,

Thanks for the reply. I'm just having a difficult time with VB Syntax
because my references aren't for 2003. I guess it changes from version to
version. And, being fairly new to VB doesn't help either.
I'm sure what you sent will be a big help. I'm compiling lots of things
that interest me from this newsgroup. I'd be a dead duck if it weren't for
you guys and this newsgroup. Maybe one day I can actually help someone out
by answering a question, instead of being a "taker" all the time. Thanks
again. - Randy

"Tom Ogilvy" wrote:

ActiveCell.Formula = "=If(AND(A1=""Snore"",B1=5),""House"",""Dog"") "

other than that, you wouldn't be nesting worksheet functions in VB.

Perhaps you can clarify your question if that isn't what you were looking
for.

--
Regards,
Tom Ogilvy

"RAP" wrote in message
...
Hello, Folks

I'm fairly adept at developing answers to my problems using worksheet
functions as long as they're entered into cells. Getting the same
functionality while using VB is a whole new ball of wax for me. Is there

an
on-line reference you can recommend for this? My reference books simply

do
not address my needs.

Ex: How do I write VB script to nest the AND and IF worksheet functions?

Thank you,
Randy




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Online reference available for x-fering functions into VB?

VB(A) doesn't really change from version to version. There may be some
additions, rarely any deletions, but things written in earlier versions
generally run in later versions.

--
Regards,
Tom Ogilvy

"RAP" wrote in message
...
Tom,

Thanks for the reply. I'm just having a difficult time with VB Syntax
because my references aren't for 2003. I guess it changes from version to
version. And, being fairly new to VB doesn't help either.
I'm sure what you sent will be a big help. I'm compiling lots of things
that interest me from this newsgroup. I'd be a dead duck if it weren't

for
you guys and this newsgroup. Maybe one day I can actually help someone

out
by answering a question, instead of being a "taker" all the time. Thanks
again. - Randy

"Tom Ogilvy" wrote:

ActiveCell.Formula = "=If(AND(A1=""Snore"",B1=5),""House"",""Dog"") "

other than that, you wouldn't be nesting worksheet functions in VB.

Perhaps you can clarify your question if that isn't what you were

looking
for.

--
Regards,
Tom Ogilvy

"RAP" wrote in message
...
Hello, Folks

I'm fairly adept at developing answers to my problems using worksheet
functions as long as they're entered into cells. Getting the same
functionality while using VB is a whole new ball of wax for me. Is

there
an
on-line reference you can recommend for this? My reference books

simply
do
not address my needs.

Ex: How do I write VB script to nest the AND and IF worksheet

functions?

Thank you,
Randy






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Online reference available for x-fering functions into VB?

You need to think of VB as instructions rather than a function that gives a
result (of course you can build a function out of VB instructions).

In VB code you make a basic IF statement:
IF Condition THEN...

Now you can think of Condition as one condition or as a combination of
several (that in the end give either a true/false result). If several you
would write

IF condition1 AND/OR condition2 AND/OR condition3 AND/OR condition 4 ...

The order of the conditions is important since you can come to different
results depending on how it is interpreted; for example
True OR False AND False
could be interpreted as either (True AND False) OR False, which would be
False, or as True OR (False AND False), which is True. VB will evaluate left
to right unless directed otherwise by brackets (it will do whatever is inside
the innermost brackets first). Whenever there is potential for confusion -
even my own confusion, not VB's! - I use brackets to make my intentions clear.

So, in the end, I might write:

IF ((Range("A1").Value = 100) AND ((Range("B1").Value<=Date) OR
(Range("C1").Value=True)) Then...

My response should show that VB is conceptually very different from
worksheet functions; VB works in discrete and very detailed steps where you
need to assemble the pieces, whereas worksheet functions do most of the work
for you if you only know how to supply the parameters. For that reason I am
doubtful any reference exists that tries to go from one to the other; I think
you would do better learning VB from scratch (there are many references
available), without thinking about worksheet functions yet. In the end it
all comes together.
--
- K Dales


"RAP" wrote:

Hello, Folks

I'm fairly adept at developing answers to my problems using worksheet
functions as long as they're entered into cells. Getting the same
functionality while using VB is a whole new ball of wax for me. Is there an
on-line reference you can recommend for this? My reference books simply do
not address my needs.

Ex: How do I write VB script to nest the AND and IF worksheet functions?

Thank you,
Randy



  #6   Report Post  
Posted to microsoft.public.excel.programming
RAP RAP is offline
external usenet poster
 
Posts: 49
Default Online reference available for x-fering functions into VB?

K Dale,

Thanks for the input. I'm definitely quite a ways from "in the end it'll
all come together." ha! Thanks for the info and the encouragement.

Randy




"K Dales" wrote:

You need to think of VB as instructions rather than a function that gives a
result (of course you can build a function out of VB instructions).

In VB code you make a basic IF statement:
IF Condition THEN...

Now you can think of Condition as one condition or as a combination of
several (that in the end give either a true/false result). If several you
would write

IF condition1 AND/OR condition2 AND/OR condition3 AND/OR condition 4 ...

The order of the conditions is important since you can come to different
results depending on how it is interpreted; for example
True OR False AND False
could be interpreted as either (True AND False) OR False, which would be
False, or as True OR (False AND False), which is True. VB will evaluate left
to right unless directed otherwise by brackets (it will do whatever is inside
the innermost brackets first). Whenever there is potential for confusion -
even my own confusion, not VB's! - I use brackets to make my intentions clear.

So, in the end, I might write:

IF ((Range("A1").Value = 100) AND ((Range("B1").Value<=Date) OR
(Range("C1").Value=True)) Then...

My response should show that VB is conceptually very different from
worksheet functions; VB works in discrete and very detailed steps where you
need to assemble the pieces, whereas worksheet functions do most of the work
for you if you only know how to supply the parameters. For that reason I am
doubtful any reference exists that tries to go from one to the other; I think
you would do better learning VB from scratch (there are many references
available), without thinking about worksheet functions yet. In the end it
all comes together.
--
- K Dales


"RAP" wrote:

Hello, Folks

I'm fairly adept at developing answers to my problems using worksheet
functions as long as they're entered into cells. Getting the same
functionality while using VB is a whole new ball of wax for me. Is there an
on-line reference you can recommend for this? My reference books simply do
not address my needs.

Ex: How do I write VB script to nest the AND and IF worksheet functions?

Thank you,
Randy

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
Need reference for max and [#this row] functions SCC Excel Worksheet Functions 1 September 4th 09 05:54 PM
Online help for Excel VB Reference taxidimu Setting up and Configuration of Excel 5 October 17th 08 06:26 PM
GET PAID $2000 PER WEEK FROM ONLINE MONEY MAKING PROGRAMME.THEREALPROGRAMME IN ONLINE mark sheder Excel Worksheet Functions 0 October 6th 08 12:01 PM
Excel 2007 : Online Resource Materials on Functions and Formulas Mr. Low Excel Discussion (Misc queries) 2 September 19th 07 09:00 PM
Can't open online Help - get "Register for My Office Online" Blue-eyed girl Excel Discussion (Misc queries) 0 April 24th 07 04:04 PM


All times are GMT +1. The time now is 11:49 PM.

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

About Us

"It's about Microsoft Excel"