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: 788
Default Macro to compare two columns and if condition is met write to a co

Hi I am new to macros. I need to write a macro that compares text in two
different columns and if the condition is met will write a numerical number
to a third column. I can do this in excel will if statements but I am
limited to only 7 nested functions. Here is the example:

IF((AND(F1="word1",G1="on")),3,IF((AND(F1="word2", G1="on")),4,IF((AND(F1="word3",G1="on")),5,0)))

Thanks


 
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
Macro to copy adjacent columns for a specified condition [email protected] Excel Programming 1 October 25th 07 12:19 AM
macro to compare file columns Mike Excel Programming 0 December 15th 05 09:21 PM
Macro to compare two columns of data Odawg Excel Discussion (Misc queries) 1 October 12th 05 02:51 PM
Macro to compare two columns of data Odawg Excel Discussion (Misc queries) 0 October 12th 05 03:13 AM
How do I write a VBA code in excel that will compare two columns . PenelopeinCinci Excel Worksheet Functions 2 April 14th 05 05:27 PM


All times are GMT +1. The time now is 07:06 AM.

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"