Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vb code in excel

help me please, I almost my mind. I tried to fix my problems long tim
but i cann't. so anyone should known this things.
I have one question; If i have numeric in cell on Column A 15 rows an
5 rows in Column B. Supposely i try to sort data in Column C by th
data of Column B match with Column A (row by row). How do i do to cod
in vb (on excel)?

Thank you for your kindness

Attachment filename: snag_004.jpg
Download attachment: http://www.excelforum.com/attachment.php?postid=39064
--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default vb code in excel

Sub Tester19()
Dim rngA As Range
Dim rngB As Range
Set rngA = Range(Cells(1, 1), Cells(1, 1).End(xlDown))
Set rngB = Range(Cells(1, 2), Cells(1, 2).End(xlDown))
rngA.Offset(0, 2).Formula = "=if(countif(" & rngB.Address &
",A1)0,A1,na())"
rngA.Offset(0, 2).Formula = rngA.Offset(0, 2).Value
On Error Resume Next
rngA.Offset(0, 2).SpecialCells(xlConstants, _
xlErrors).ClearContents

End Sub


--
Regards,
Tom Ogilvy



woranan wrote in message
...
help me please, I almost my mind. I tried to fix my problems long time
but i cann't. so anyone should known this things.
I have one question; If i have numeric in cell on Column A 15 rows and
5 rows in Column B. Supposely i try to sort data in Column C by the
data of Column B match with Column A (row by row). How do i do to code
in vb (on excel)?

Thank you for your kindness.

Attachment filename: snag_004.jpg
Download attachment:

http://www.excelforum.com/attachment.php?postid=390643
---
Message posted from http://www.ExcelForum.com/



Reply
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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Code to conditional format all black after date specified in code? wx4usa Excel Discussion (Misc queries) 3 December 26th 08 07:06 PM
Drop Down/List w/Code and Definition, only code entered when selec Spiritdancer Excel Worksheet Functions 2 November 2nd 07 03:57 AM
Convert a Number Code to a Text Code Traye Excel Discussion (Misc queries) 3 April 6th 07 09:54 PM
copying vba code to a standard code module 1vagrowr Excel Discussion (Misc queries) 2 November 23rd 05 04:00 PM


All times are GMT +1. The time now is 05:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"