Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The last blank cell is now selecting only the cell remains without a value.
It should contain the value taken from "B9" here is the code as it looks now: If IsEmpty(Range("b9")) Then MsgBox "No record found in B9.", vbInformation Else lngLastRow = Cells(Rows.Count, "B").End(xlUp).Row + 1 If lngLastRow <= 10 Then Range("B10").Value = Range("B9").Value Else Cells(lngLastRow, "B").Select If Not rng Is Nothing Then rng.Select End If End If End If Gotroots "Rick Rothstein" wrote: You should really stay with one thread... it would have been better if you posted this question back in your original thread where you got some of this code from. -- Rick (MVP - Excel) "Gotroots" wrote in message ... The last blank cell containing the value of "B9" does not rng.Select. Much appreciate if someone could advise me as to why. If IsEmpty(Range("b9")) Then MsgBox "No record found in B9.", vbInformation Else lngLastRow = Cells(Rows.Count, "B").End(xlUp).Row + 1 If lngLastRow <= 10 Then Range("B10").Value = Range("B9").Value Else Cells(lngLastRow, "B").Value = Range("B9").Value If rng Is Nothing Then Else rng.Select End If End If End If End Sub . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Paste data of a cell to another cell by just selecting the source | Excel Programming | |||
Excel 2007 single cell selecting muliple cell | Excel Worksheet Functions | |||
Selecting a cell entry based on cell validation selection | Excel Worksheet Functions | |||
Transfer cell values to another cell by selecting button. | Excel Worksheet Functions | |||
Selecting 10 charcters on one cell and pasting to another cell | Excel Programming |