LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default how to write macro that filters odd & even numbered data ?

I don't know if you have Text or Numbers, the following will work for either:

The follow formula provides True for Even numbers
=TRUNC(RIGHT(A1)/2)*2=RIGHT(A1)+0

The following formula provides True for Odd numbers
= NOT(TRUNC(RIGHT(A1)/2)*2=RIGHT(A1)+0)

You can read about filtering at
http://www.contextures.com/tiptech.html

The easiest way is to use a helper column, put either formula into Column B
then Select Column B (cell B1 active cell), Data, Filter, Auto Filter
on the arrow drop down choose True or choose False

You can copy the cells and paste elsewhere because a filtered list exposes
on those that make it through the filter, or you can print the list. .
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"banu" wrote ...
Could anyone please help me to write a macro that filters odd & even numbered
IPAddress from a huge list fo data.



 
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
Write Macro to Fix Data Alignment (Data dump from Crystal to Excel Karin Excel Discussion (Misc queries) 2 September 22nd 09 05:31 PM
create numbered sortable numbered list in excel coloradio Excel Discussion (Misc queries) 2 November 15th 06 06:50 PM
write a macro to input data JPreeshl Excel Discussion (Misc queries) 2 May 6th 06 09:25 PM
write macro to input data Macro Help New Users to Excel 4 December 30th 05 12:10 AM
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? Daniel Excel Worksheet Functions 1 June 23rd 05 11:38 PM


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