Values to increase until it hits the correct value

gazza_606

New Member
Joined
Aug 19, 2014
Messages
22
I currently have a column of numbers that raise in values of 1, i need these values to keep raising to a maximum value in another sheet. say for example

sheet "1" has a column that starts at 0 and goes to 1, 2, 3 but carries on going.
Sheet "2" has a value that is calculated in cell B3
I then need the column in sheet 1 to stop once it hits the value calculated in sheet 2 B3

I am trying to use the IF command but keep getting errors.

Can some help with this.
Thanks
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi,

an attempt: in sheet1 first number in A2


=MIN(ROW()-1,sheet2!B$3)

to be copied down

Hope it helps

edit: sorry the corrections: I'm translating from my not English settings
 
Last edited:
Upvote 0
Hi Canapone,

Thanks for this, i have changed it around slightly to =MIN((A30)+1,'Engine Data Sheet'!$B$39) - It was easier to call it sheet 1 & 2 for explaining :). So this now works so thanks for that.

For a test i changed B39 to a value of 12 and it goes up to a maximum of 12 but then every value after that stays at 12. I only need it to go up to the very first 12 and then remove the other values after that, sorry i didnt add that into my first post.
Thanks
 
Upvote 0
Hi,

thanks for your kind feedback.

Just for sharing other ideas, you have to adjust references.

=IF(ROW()-1>Sheet2!$B$3,"",MIN(ROW()-1,Sheet2!$B$3))

Regards
 
Upvote 0
Thanks that works great now, just need to remove the #VALUE! which appears after the maximum value. I will try and find this out :)
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,397
Members
448,957
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top