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 Problems with IF's

Hey Guys,

Thanks for your help in this, I always get confused when making thes
macros. I am trying to have a searchable spreadsheet. So I am usin
Autofilter, so based on some dropdown boxes, it returns some value, an
if that value is blank, I don't want it to filter that column. I kno
it is using Elseif, but I can't figure it out.

In addition, If U10 is =both, include both a long form and short for
of something, if its long, then include only long.

The Code:

Sub Macro3()
Range("s6:S10").Copy
Range("u6:u10").PasteSpecial (xlPasteValues)
Range("a5").Select
Selection.AutoFilter

If Range("u6").Value < 0 Then
Selection.AutoFilter Field:=1, Criteria1:=Range("u6").Value
End If

If Range("u7").Value < 0 Then
Selection.AutoFilter Field:=4, Criteria1:=Range("u7").Value
End If

If Range("u8").Value < 0 Then
Selection.AutoFilter Field:=5, Criteria1:=Range("u8").Value
End If

If Range("u9").Value < 0 Then
Selection.AutoFilter Field:=6, Criteria1:=Range("u9").Value
End If

If Range("u10").Value < 0 Then
Selection.AutoFilter Field:=1, Criteria1:=Range("u10").Value
End If


End Su

--
Message posted from http://www.ExcelForum.com

 
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
Sum with 2 if's Nadine Excel Worksheet Functions 1 May 6th 10 10:08 PM
Too many 'if's! Ben Mehling Excel Discussion (Misc queries) 4 May 11th 07 01:31 PM
IF's karensa Excel Worksheet Functions 4 December 27th 06 10:05 PM
to many 'IF's'?? boufant Excel Worksheet Functions 4 July 2nd 05 10:58 AM
How many if's? Christopher Anderson Excel Discussion (Misc queries) 4 January 5th 05 03:16 PM


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