#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Data pick-up

I have information exported from an accounting system into an Excel
spreadsheet. The export has 3 columns; the first column contains the value of
the first data of the range; the second column contains the end value of the
range; the third column shows a percentage rate applicable to all values
within the range. e.g.

C00123 C00125 15%
C00128 C00130 100%

Note there is a gap between the end value at column 2 in row 1 and the next
value in column 1 of row 2. The intervening range has a default percentage
rate of 0%.

If I have a separate list of just data such as:

C00123
C00124
C00125
C00126
C00127
C00128
C00129
C00130
C00131

is it possible to allocate the data in column 3 of the original export to
this list by a formula? i.e. I could use a formula copied down in the next
column that would refer to the original export, and pick up the 3rd column
data, including the data not shown therein (i.e. the 0% allocated to the
"invisible" ranges between the ranges shown) to arrive at:

C00123 15%
C00124 15%
C00125 15%
C00126 0%
C00127 0%
C00128 100%
C00129 100%
C00130 100%
C00131 0% et seq

Thank you for any help you can offer.

--
Geoff
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Data pick-up

Try this macro where col a,b,c has the original, col e has the list and
desired in col f. Adjust to suit. Based on looking at the right 3 characters
as described in OP.

If you're new to macros, you may want to read David McRitchie's intro
at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

=====
Sub reordervalues()
For i = 2 To Cells(Rows.Count, "e").End(xlUp).Row
Cells(i, "f") = 0
x = Right(Cells(i, "e"), 3)
For j = 2 To Cells(Rows.Count, "a").End(xlUp).Row
If x = Right(Cells(j, "a"), 3) And _
x <= Right(Cells(j, "b"), 3) Then _
Cells(i, "F") = Cells(j, "c")
Next j
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Geoffric" wrote in message
...
I have information exported from an accounting system into an Excel
spreadsheet. The export has 3 columns; the first column contains the value
of
the first data of the range; the second column contains the end value of
the
range; the third column shows a percentage rate applicable to all values
within the range. e.g.

C00123 C00125 15%
C00128 C00130 100%

Note there is a gap between the end value at column 2 in row 1 and the
next
value in column 1 of row 2. The intervening range has a default percentage
rate of 0%.

If I have a separate list of just data such as:

C00123
C00124
C00125
C00126
C00127
C00128
C00129
C00130
C00131

is it possible to allocate the data in column 3 of the original export to
this list by a formula? i.e. I could use a formula copied down in the next
column that would refer to the original export, and pick up the 3rd column
data, including the data not shown therein (i.e. the 0% allocated to the
"invisible" ranges between the ranges shown) to arrive at:

C00123 15%
C00124 15%
C00125 15%
C00126 0%
C00127 0%
C00128 100%
C00129 100%
C00130 100%
C00131 0% et seq

Thank you for any help you can offer.

--
Geoff


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
Pick data from an array Winston Williams Excel Discussion (Misc queries) 6 June 23rd 07 11:24 PM
Extract data value using pick list CJ Excel Worksheet Functions 3 December 5th 06 07:27 PM
How to pick data from different sheets conditionally? TR Excel Worksheet Functions 5 October 19th 06 09:04 PM
Getting charts to automatically pick data from a series Salmonh20 Charts and Charting in Excel 3 April 8th 06 07:41 PM
Should Merging workbooks pick up new data or only edited data? Peggy L. Excel Worksheet Functions 0 January 13th 05 05:31 PM


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