ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select blank cell (https://www.excelbanter.com/excel-programming/288170-select-blank-cell.html)

Hodar

Select blank cell
 
Im a newbee in VBA, and I have a simple problem.

How can I select a blank cell in a given range and relpace it with a
value from another cell.

Any quick VBA programmers out there?


---
Message posted from http://www.ExcelForum.com/


Tom Ogilvy

Select blank cell
 
Dim rng as Range
On Error Resume Next
set rng = Range("A1:A10").specialCells(xlBlanks)
On Error goto 0
if not rng is nothing then
rng(1).Value = "rng(1).offset(-1,0)
End if

--
Regards,
Tom Ogilvy

"Hodar " wrote in message
...
Im a newbee in VBA, and I have a simple problem.

How can I select a blank cell in a given range and relpace it with a
value from another cell.

Any quick VBA programmers out there?


---
Message posted from http://www.ExcelForum.com/




Hodar[_2_]

Select blank cell
 
Thanx Tom

It worked perfectly

--
Message posted from http://www.ExcelForum.com


gfinch[_7_]

Select blank cell
 
I am trying to do something very similar. Is it possible to modify th
coding here and allow every blank cell within a column to copy th
value of the cell immediately before it. For instance, a blank in cel
B10 copies B9, blank cell B37 copies B36, etc.
Thanks for the help.
Gi

--
Message posted from http://www.ExcelForum.com


Dave Peterson[_3_]

Select blank cell
 
Debra Dalgleish has some code (as well as manual instructions) at:


"gfinch <" wrote:

I am trying to do something very similar. Is it possible to modify the
coding here and allow every blank cell within a column to copy the
value of the cell immediately before it. For instance, a blank in cell
B10 copies B9, blank cell B37 copies B36, etc.
Thanks for the help.
Gib

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson


Dave Peterson[_3_]

Select blank cell
 
Debra Dalgleish has some code (as well as manual instructions) at:
http://www.contextures.com/xlDataEntry02.html

"gfinch <" wrote:

I am trying to do something very similar. Is it possible to modify the
coding here and allow every blank cell within a column to copy the
value of the cell immediately before it. For instance, a blank in cell
B10 copies B9, blank cell B37 copies B36, etc.
Thanks for the help.
Gib

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson


gfinch[_8_]

Select blank cell
 
Dave,
Thanks for the info.
Gib


---
Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 10:16 PM.

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