Home |
Search |
Today's Posts |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code to insert text
You could do it as a macro but it has to be overtly run by a button, a call, or an event
Dim MyRange as Range, c as Range, x as integer set MyRange = columns(x) "where x is the column # you want to use as the source" For each c in MyRange if c.value = "" then Exit For " This assumes your data is contiguous. One missing value and the loop ends" if c.value 1 then c.offset(0,1).value = "inc." update the value of the cell over to the right Next c ----- gav meredith wrote: ----- hi anders, thank you but with this, if the content of this cell is deleted, wont the formula delete also?? This is what i am trying to avoid. Any other suggestions would be great!!! "Anders S" wrote in message ... Enter in D1 =IF(C11,"Inc","") Then fill down. HTH Anders Silven "gav meredith" skrev i meddelandet ... Hi all, I am after a code that inserts the text 'Inc' into a cell if the cell next to it is greater than 1. ie: if C11 then D1 should read 'Inc'. I am in urgent need of this so any help is appreciated!!! cheers!!! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert Code | Excel Worksheet Functions | |||
Convert a Number Code to a Text Code | Excel Discussion (Misc queries) | |||
How to insert code | Excel Discussion (Misc queries) | |||
Insert Code | New Users to Excel | |||
insert data into macro code from text input field? | Excel Programming |