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: 2,069
Default If then and 2 cell values

I am trying to run the following statement... which works fine for whatever
my N6 value is. however, I would like it to run the same way if either cell
N6 or O6 has the conditional properties in the statment. Do I need to run
some sort of loop? Can I put in an "OR" so that ... If Len(Range("n6") OR
("o6").Value) = 3 Then......
I think I need to run a loop that will run, but I have only worked with VBA
for a couple of weeks so I am not exactly sure.

If Len(Range("n6").Value) = 3 Then
SendKeys "{TAB}"
SendKeys "{TAB}"
SendKeys "{TAB}"
SendKeys "{TAB}"
SendKeys "{TAB}"
ElseIf (Range("n6").Value) = "fedl" Then
SendKeys "{TAB}"
SendKeys "{TAB}"
SendKeys "{TAB}"
Else:
SendKeys "{TAB}"
SendKeys "{TAB}"
End If

Thanks for the help!!!
 
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
VLookup multiple values - sum returned values into single cell se7098 Excel Worksheet Functions 12 April 2nd 23 07:32 PM
Copy values from a cell based on values of another cell Spence10169 Excel Discussion (Misc queries) 4 January 13th 09 10:01 AM
How to assign values to a cell based on values in another cell? Joao Lopes Excel Worksheet Functions 1 December 5th 07 09:02 PM
Search/Filter to find values in another range based on two cell values Andy Excel Programming 2 April 29th 04 04:08 PM


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