Richard Teasdale
asked on
inserting text excel
Hi:
In excel I have a comments field.
There are a range of comments I can put in but for example the logic is as follows:
"if cell a2 > 0 then comment is "urgent"". This applies to every cell in column a, down to a200.
Because the comment cell is also used for typed text then any formula will be overwritten.
So I need somehow to be able to click a button and excel will scroll down the comment column, inserting the appropriate text where the criteria is met.
Is this possible?
Thanks!
In excel I have a comments field.
There are a range of comments I can put in but for example the logic is as follows:
"if cell a2 > 0 then comment is "urgent"". This applies to every cell in column a, down to a200.
Because the comment cell is also used for typed text then any formula will be overwritten.
So I need somehow to be able to click a button and excel will scroll down the comment column, inserting the appropriate text where the criteria is met.
Is this possible?
Thanks!
ASKER
Thanks for that kalpesh2804 - but it is not the button itself I am struggling with; it is the VBA.
Say the comment field is in column B. And the criteria field is column A. Then my code needs to read "while Ax < A200 then for each A where value > 0 then set value of B to "Urgent"".
I could always cheat and have a column C for manually typed comments but space is limited on the live sheet and the print small enough as it is!
Thanks
Say the comment field is in column B. And the criteria field is column A. Then my code needs to read "while Ax < A200 then for each A where value > 0 then set value of B to "Urgent"".
I could always cheat and have a column C for manually typed comments but space is limited on the live sheet and the print small enough as it is!
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Just like that, thanks!
I actually need to change a different column - so column B changes, not A - but you have given me the platform!
Thanks again!
I actually need to change a different column - so column B changes, not A - but you have given me the platform!
Thanks again!
Glad I could help.
NG,
NG,
http://www.wikihow.com/Create-a-Custom-Macro-Button-in-Excel
and command button event from below link
http://www.excelforum.com/excel-programming/754435-run-command-button-click-event-on-open.html