A challange

crapshoot

New Member
Joined
Jun 8, 2011
Messages
12
Not sure this can be done or where to start, but you all have been amazing with my other questions ... so here goes.

I am running Excel 2002, my spreadsheet is rows 2 - 259, columns A to BR, I would like to paste A - K if say B>=5 and F <=50. I would do more searching on my own, but I am about 95% blind and I find Windows magnifier very difficult to work with. I would appreciate any help.



















3
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
"I would like to paste A - K if say B>=5 and F <=50"

Do you mean you want to copy the cells in column A and column K and paste to somewhere else if the criteria are met?
Or do you want to copy the cells in columns A:K to somewhere else if the criteria are met?
In either case, to where should the cells be pasted?
 
Upvote 0
I would like to copy and paste the row, columns A:K to blank cells if the criteria is met. The blank cells would be at the bottom of my spreadsheet - just below my last filled rows.
 
Last edited:
Upvote 0
Code:
Dim rng As Range, cel As Range
Set rng = Range([A2], Cells(Rows.Count, 1).End(xlUp))
For Each cel In rng
    If cel(1, 2) >= 5 And cel(1, 6) <= 50 Then _
        cel.Resize(, 11).Copy Cells(Rows.Count, 1).End(xlUp)(2)
Next
 
Upvote 0
I was afraid of that, I don't even know how to enter it, I guess I will have to dig in and learn.

I use to be a pretty decent Basic programmer and this looks a little like that, however that was back in 1975.

I take it that "Set rng = Range([A2], Cells(Rows.Count, 1).End(xlUp)) " is not entered literally and I would have to enter the range of 2 - 259 somewhere in there for the range of the loop. I notice the 'copy' ... is this also going to paste it? and I guess I have to specify where.

Looks like I have some learning in front of me.
 
Upvote 0
All you have to do is copy the code I posted and paste it to a macro.

Then run the macro and see if it does what you want.
 
Upvote 0

Forum statistics

Threads
1,224,552
Messages
6,179,487
Members
452,917
Latest member
MrsMSalt

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