Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Two little problems

Hello all,

I have two little problems that i would greatly apreciate
any help with!!

FIRST:
I am trying to search through my staff register for
members of staff with first/sur name match, these are
found in columns 2 and 3
but the range i am using is from .cells(6,1) to .Cells
(65536, 1).End(xlUp)
only problem is... column A contains staff numbers and my
records do not have staff numbers for all members of
staff... so... it only searches from the first member to
the last member whos staff number is available and none
after that!!
any ideas of how i can force the search to go through all
my records? bearing in mind that i need cell location to
start at column A so i can manipulate the offset!!

SECONDLY:
My search results are displayed in a listbos... when i
double click on the data in the list box...
Data = cell.Text + " " + cell.Offset(0, 2).Text + " " +
cell.Offset(0, 3).Text

therefore when i double click a record i wish to display i
need to be able to display where this critera is met...
i have tried using a loop until cell.Text + " " +
cell.Offset(0, 2).Text + " " + cell.Offset(0, 3).Text =
list index, but it does not work...

any ideas on how i can get this to work??

Thank you for any help

Robert Couchman
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Two little problems

For your first problem, why not use offset again, eg assuming that column B
is populated for all records:

..Cells(65536, 2).End(xlUp).Offset(0,-1)

Cheers,
Jeff

"Robert Couchman" wrote in message
...
Hello all,

I have two little problems that i would greatly apreciate
any help with!!

FIRST:
I am trying to search through my staff register for
members of staff with first/sur name match, these are
found in columns 2 and 3
but the range i am using is from .cells(6,1) to .Cells
(65536, 1).End(xlUp)
only problem is... column A contains staff numbers and my
records do not have staff numbers for all members of
staff... so... it only searches from the first member to
the last member whos staff number is available and none
after that!!
any ideas of how i can force the search to go through all
my records? bearing in mind that i need cell location to
start at column A so i can manipulate the offset!!

SECONDLY:
My search results are displayed in a listbos... when i
double click on the data in the list box...
Data = cell.Text + " " + cell.Offset(0, 2).Text + " " +
cell.Offset(0, 3).Text

therefore when i double click a record i wish to display i
need to be able to display where this critera is met...
i have tried using a loop until cell.Text + " " +
cell.Offset(0, 2).Text + " " + cell.Offset(0, 3).Text =
list index, but it does not work...

any ideas on how i can get this to work??

Thank you for any help

Robert Couchman



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Two little problems

The following will give you the number of the last row used of an
column:

lrow = Sheet1.UsedRange.Row + Sheet1.UsedRange.Rows.Count

- piku

--
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
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
Problems Kay Excel Worksheet Functions 2 May 22nd 09 02:37 AM
STILL Having VBA Problems!!!!!!! Elise148 Excel Discussion (Misc queries) 9 July 3rd 07 08:40 PM
Problems with XLA:s Ingvar Excel Programming 5 March 2nd 04 03:29 AM
Dir problems Jim[_24_] Excel Programming 2 October 6th 03 10:22 PM


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