View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chris Chris is offline
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