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


hi..

I have to select a value from one sheet and find this value
in another
sheet. The problem is ... there are some 800 such values. I
am selecting a
value from sheet and then activating the other sheet again.
off course this
is not a correct way...as the sheets keep blinking! I think
i need to use
arrays....but still i am unable to figure out the exact
methood...

here is my code:
i = 2
While i <= lastCellNum
fam = check_fam(Cells(i, 3))
'RETRIEVE FINAL PACKAGE FAMILY FROM
"PackageMasterFile.xls"

Workbooks("PackageMasterFile").Worksheets("Package ").Activate
Set Ofind = Columns("A:A").Find(fam)
If Ofind Is Nothing Then
'MsgBox (fam)
MsgBox "The particular Family not found in
PackageMasterFile.xls"
Exit Sub
Else
'MsgBox (Ofind.Address)
extractValue = Ofind.Offset(0, 1)
Workbooks("best").Worksheets("raw_data").Activate
Cells(i, 4) = extractValue
End If
i = i + 1
Wend

any help?

thanks
monika

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default selecting values

Does this speed things up ?

Dim pmf As Worksheet
Dim brd As Worksheet


Set pmf = Workbooks("PackageMasterFile").Worksheets("Package ")
Set brd = Workbooks("best").Worksheets("raw_data")
Application.ScreenUpdating = False
i = 2
While i <= lastCellNum
fam = check_fam(Cells(i, 3))
'RETRIEVE FINAL PACKAGE FAMILY FROM
"PackageMasterFile.xls"


Set Ofind = mf.Columns("A:A").Find(fam)
If Ofind Is Nothing Then
'MsgBox (fam)
MsgBox "The particular Family not found in"
PackageMasterFile.xls ""
Exit Sub
Else
'MsgBox (Ofind.Address)
extractValue = Ofind.Offset(0, 1)
brd.Cells(i, 4) = extractValue
End If
i = i + 1
Wend
Application.ScreenUpdating = Tru

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default selecting values

Hi Kieran

thanks for the response.

Yes my blinking problem resolved with screenupdating ... i never realized
its usage clearly..though i had been using it previously ..thanks...!

but still the whole process is taking time... because i am activating both
files one by one for 800 such values.

thanks
Monika


"Kieran " wrote in message
...
Does this speed things up ?

Dim pmf As Worksheet
Dim brd As Worksheet


Set pmf = Workbooks("PackageMasterFile").Worksheets("Package ")
Set brd = Workbooks("best").Worksheets("raw_data")
Application.ScreenUpdating = False
i = 2
While i <= lastCellNum
fam = check_fam(Cells(i, 3))
'RETRIEVE FINAL PACKAGE FAMILY FROM
"PackageMasterFile.xls"


Set Ofind = mf.Columns("A:A").Find(fam)
If Ofind Is Nothing Then
'MsgBox (fam)
MsgBox "The particular Family not found in"
PackageMasterFile.xls ""
Exit Sub
Else
'MsgBox (Ofind.Address)
extractValue = Ofind.Offset(0, 1)
brd.Cells(i, 4) = extractValue
End If
i = i + 1
Wend
Application.ScreenUpdating = True


---
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
selecting 20 closest values from a list of 200 values michele New Users to Excel 1 August 12th 08 04:46 PM
Selecting values... NWO Excel Discussion (Misc queries) 4 February 15th 07 03:55 AM
Selecting Various Values for One Source [email protected] Excel Discussion (Misc queries) 3 June 16th 06 09:45 PM
Selecting more than one filter values jamex Excel Discussion (Misc queries) 2 March 18th 06 02:32 PM
selecting values from raw data cebu2b Excel Worksheet Functions 1 February 22nd 06 08:22 PM


All times are GMT +1. The time now is 10:07 AM.

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"