Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SpecialCells used to enter data
I have a script I acquired from a website, slightly modified, but still need
help. The following script places the text "formula here" in every cell (in column B) where there exists an entry. What I would like to do is place the text in the cell to the right of where an entry exists. In otherwords the text "formula here" would fall under column C in every row there exists an entry in column B. I tried using the OFFSET command within the script but with no success. I might add the the range of entries in column B will change from time to time. For example there may be entries in the first 10 rows whereas another time there may be entries in the first 5000 rows. The first row will always serve as a header. Any suggestions? Thanks, Gary Sub detect_data() If WorksheetFunction.CountA(Range("B:B")) = 0 Then MsgBox "Please enter data", vbOKOnly, "Alert!" Exit Sub End If On Error Resume Next Range("B:B").SpecialCells(xlCellTypeConstants) = "formula here" On Error GoTo 0 End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Vlookup if #N/A then enter enter data in cell I4 | Excel Discussion (Misc queries) | |||
Macro to select cells in column enter data then press enter | New Users to Excel | |||
Auto enter date when data in enter in another cell | Excel Worksheet Functions | |||
Specialcells | Charts and Charting in Excel | |||
enter data on 1 sheet and make it enter on next avail row on 2nd s | Excel Discussion (Misc queries) |