LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Code Steph Excel Worksheet Functions 0 February 27th 10 06:08 PM
Convert a Number Code to a Text Code Traye Excel Discussion (Misc queries) 3 April 6th 07 09:54 PM
How to insert code Karl Excel Discussion (Misc queries) 3 January 8th 07 11:01 PM
Insert Code Derek Y via OfficeKB.com New Users to Excel 3 October 17th 05 03:48 AM
insert data into macro code from text input field? john_t_h[_15_] Excel Programming 1 January 16th 04 03:14 AM


All times are GMT +1. The time now is 05:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"