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: 11
Default Value between 2 values

Hi I'm a newbie to writing macro, so could someone please help me with
this. I have 2 sheets in a workbook. Sheet 1 looks like this
Column A Column B Column C
ABCDE 3000 3099
BDSCXD 4500 4599
UIT 4800 5199
SWEDFE 5300 5399
SmartS 5450 5499
XYZ123 5600 5629
QWER23 5650 5669


Sheet2 looks like this

Column A Column B Column C
4523 12345
5621 34543
4545 43534
5326 23453
5629 23432

I need to check the data in Column B (in Sheet 2) above and compare it
with Sheet 1, i.e., see if it lies between Column B & Column C (in
Sheet 1). For example: "4523" is the first value in Sheet 2, I need to
see which row 4523 belongs in Sheet 1, i.e., 4523 lies between 4500 &
4599 (row2 in Sheet1), when it finds the row I need to pick up the
name in Column A and put it in Column A of Sheet2. Another example the
last value is 5629 and it lies between 5600 & 5629. So basically
Column B in Sheet2 is a data that lies between a start and end value
(ColumnB & columnC in sheet1).
The result will look like this in Sheet2

Column A Column B Column C
BDSCXD 4523 12345
XYZ123 5621 34543
BDSCXD 4545 43534
SWEDFE 5326 23453
XYZ123 5629 23432

I don't know if this is of importance, their are more than 15000 rows
in Sheet2.

Thanks in advance for any help!
 
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
Excel 2007 doesnt show Y-axis values when the values are small. outback Charts and Charting in Excel 2 October 26th 08 01:37 AM
Exclude #N/A values and Return Numeric values to consecutive cells in Single Row Sam via OfficeKB.com Excel Worksheet Functions 5 February 9th 08 03:07 AM
Why does this code remove Duplicate Values, by showing only 1, but it does NOT show Unique values for some reason ? Corey Excel Programming 4 February 23rd 07 02:00 AM
How do I search thr'o column and put unique values in differnt sheet and sum corresponding values in test test Excel Programming 3 September 9th 03 08:53 PM
Predict Y-values on new X-values based on other actual X and Y values? NorTor Excel Programming 2 August 10th 03 03:08 PM


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