ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Placing Data in a Range (https://www.excelbanter.com/excel-programming/364251-placing-data-range.html)

tedd13

Placing Data in a Range
 
I have a spreadsheet that has a set number of ranges for each row. It looks
something like this:
col1 col2
1-100 $$$$
101-200 $$$$
201-300 $$$$

In another part of the spreadsheet I have a range of data containing dollar
amounts. The data looks something like this:
col5
99
127
299

What I want to do is to read through the column in this data and place the
amounts in the correct range. So for this example the value in the first
cell in col5 is 99, so it would go in the column with the range of 1 - 100.
It would read through the value ranges until it found a valid range.

I hope I am explaining this correctly. Any help would be great. Thanks

Tom Ogilvy

Placing Data in a Range
 
will there only be one number for each range as your example shows. If not,
why not just sort them, then copy and paste?

If not, where do multiple values go (add them?, list to the right?)

If you are going to add them, then you would be better off using sumif to
get a total. If there will only be one per range, you could also use sumif.


--
Regards,
Tom Ogilvy


"tedd13" wrote:

I have a spreadsheet that has a set number of ranges for each row. It looks
something like this:
col1 col2
1-100 $$$$
101-200 $$$$
201-300 $$$$

In another part of the spreadsheet I have a range of data containing dollar
amounts. The data looks something like this:
col5
99
127
299

What I want to do is to read through the column in this data and place the
amounts in the correct range. So for this example the value in the first
cell in col5 is 99, so it would go in the column with the range of 1 - 100.
It would read through the value ranges until it found a valid range.

I hope I am explaining this correctly. Any help would be great. Thanks


tedd13

Placing Data in a Range
 
Tom,

Yes there are multiple values. I tried the sumif and it kind of worked.
The problem I found with it is that it looks like you can only use one
criteria to check against. For example:
SUMIF(C1:C17,"<=200",B1:B17).
This will give me the range from 101 - 200 but also the range from 1 - 100.
Is there a way to put somekind of 'between' logic in a statement like that?

Thanks

"Tom Ogilvy" wrote:

will there only be one number for each range as your example shows. If not,
why not just sort them, then copy and paste?

If not, where do multiple values go (add them?, list to the right?)

If you are going to add them, then you would be better off using sumif to
get a total. If there will only be one per range, you could also use sumif.


--
Regards,
Tom Ogilvy


"tedd13" wrote:

I have a spreadsheet that has a set number of ranges for each row. It looks
something like this:
col1 col2
1-100 $$$$
101-200 $$$$
201-300 $$$$

In another part of the spreadsheet I have a range of data containing dollar
amounts. The data looks something like this:
col5
99
127
299

What I want to do is to read through the column in this data and place the
amounts in the correct range. So for this example the value in the first
cell in col5 is 99, so it would go in the column with the range of 1 - 100.
It would read through the value ranges until it found a valid range.

I hope I am explaining this correctly. Any help would be great. Thanks



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com