LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using the And formula in a VBA macro

I'm learning VBA and have got stuck!

I have a spreadsheet with 7 columns of information. I want to work
down the spreadsheet, testing 4 criteria. The critera look at the
columns and test to see if they apply. I can use the And function to
return a true or false value.

I want to use VBA to say that if a particular condition applies then
put 'text1' in the cell to the right, if not test the next condition
and if that is true then put 'text2' in the cell to the right, if not
test the next condition.

I've recorded the macro and am using an activecell.formula = approach.
I just can't get it to run in an Else If way. The first test runs
but the second doesn't. I can't put an if statement before the
activecell.formula.

Has anyone got any ideas on how to overcome this?

Much appreciated


Corinne R
 
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
help with the macro or with the formula Igneshwara reddy[_2_] Excel Worksheet Functions 6 March 22nd 07 09:16 PM
Macro or Formula? A.S. Excel Discussion (Misc queries) 1 September 20th 06 05:26 PM
Help with macro or formula JAZZNAURA Excel Discussion (Misc queries) 0 August 18th 06 08:41 AM
Macro/Formula Help? fluci Excel Discussion (Misc queries) 8 August 5th 05 11:31 PM
Formula to macro...anyone?? adidas VBA Excel Programming 12 December 4th 03 04:41 AM


All times are GMT +1. The time now is 09:42 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"