Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Can anyone tell me what I need to add to the code below to move the range up
1 row? LastRowInB = .Cells(.Rows.Count, "B").End(xlUp).Row .Range("A1:C" & FoundCell.Row).Select Many thanks! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Maybe this:
Range("A1:C" & FoundCell.Row.Offset(-1, 0)).Select Regards, Paul "Stan" wrote in message ... Can anyone tell me what I need to add to the code below to move the range up 1 row? LastRowInB = .Cells(.Rows.Count, "B").End(xlUp).Row .Range("A1:C" & FoundCell.Row).Select Many thanks! |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Regretfully that gives me an invalid qualifier error.
"PCLIVE" wrote: Maybe this: Range("A1:C" & FoundCell.Row.Offset(-1, 0)).Select Regards, Paul "Stan" wrote in message ... Can anyone tell me what I need to add to the code below to move the range up 1 row? LastRowInB = .Cells(.Rows.Count, "B").End(xlUp).Row .Range("A1:C" & FoundCell.Row).Select Many thanks! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You may need to post more of your code. But on first glance, it appears you
have periods in various places that I don't understand. I was assuming everything was working with the exception of selecting one row up. Try this: LastRowInB = Cells(Rows.Count, "B").End(xlUp).Row Range("A1:C" & FoundCell.Row.Offset(-1, 0)).Select HTH, Paul "Stan" wrote in message ... Regretfully that gives me an invalid qualifier error. "PCLIVE" wrote: Maybe this: Range("A1:C" & FoundCell.Row.Offset(-1, 0)).Select Regards, Paul "Stan" wrote in message ... Can anyone tell me what I need to add to the code below to move the range up 1 row? LastRowInB = .Cells(.Rows.Count, "B").End(xlUp).Row .Range("A1:C" & FoundCell.Row).Select Many thanks! |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
.Range("A1:C" & FoundCell.Row - 1).Select
or maybe .Range("A1:C" & lastrowinB - 1).Select Stan wrote: Can anyone tell me what I need to add to the code below to move the range up 1 row? LastRowInB = .Cells(.Rows.Count, "B").End(xlUp).Row .Range("A1:C" & FoundCell.Row).Select Many thanks! -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sorry about that. Had a brain fart. Go with Dave Peterson's suggestion.
"PCLIVE" wrote in message ... You may need to post more of your code. But on first glance, it appears you have periods in various places that I don't understand. I was assuming everything was working with the exception of selecting one row up. Try this: LastRowInB = Cells(Rows.Count, "B").End(xlUp).Row Range("A1:C" & FoundCell.Row.Offset(-1, 0)).Select HTH, Paul "Stan" wrote in message ... Regretfully that gives me an invalid qualifier error. "PCLIVE" wrote: Maybe this: Range("A1:C" & FoundCell.Row.Offset(-1, 0)).Select Regards, Paul "Stan" wrote in message ... Can anyone tell me what I need to add to the code below to move the range up 1 row? LastRowInB = .Cells(.Rows.Count, "B").End(xlUp).Row .Range("A1:C" & FoundCell.Row).Select Many thanks! |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
try this. You may want row-1. Why are you selecting?
LastRowInB = .Cells(.Rows.Count, "B").End(xlUp).Row .Range("A1:C" & lastrowinb).Select -- Don Guillett SalesAid Software "Stan" wrote in message ... Can anyone tell me what I need to add to the code below to move the range up 1 row? LastRowInB = .Cells(.Rows.Count, "B").End(xlUp).Row .Range("A1:C" & FoundCell.Row).Select Many thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA code question | Excel Discussion (Misc queries) | |||
Code question for clearing a command checkbox. | Excel Discussion (Misc queries) | |||
question about excessive code in replacing #N/A when using VLOOKUP | Excel Discussion (Misc queries) | |||
Easy VB code question | Excel Discussion (Misc queries) | |||
syntax question - cell references in VB code | New Users to Excel |