I need a formula or code to make any number i put into a cell negative. I need it for latitudes because when they get imported into mappoint it uses +/- to determine east or west.
I need a formula or code to make any number i put into a cell negative. I need it for latitudes because when they get imported into mappoint it uses +/- to determine east or west.
Hi zb61,
The following code attached to your worksheet will change all values to negative as you enter them. It will also allow you to directly enter negative values (by accident or on purpose) through the IF statement.
Updated code to handle text strings, the previous code would fail.Please Login or Register to view this content.
Last edited by Paul; 10-31-2007 at 09:39 PM.
is there a way to just make that focus on a certain column?
Sure, it can be modified to:
Change the Columns(1) to the column you want it to affect. B=2, F=6, etc.Please Login or Register to view this content.
Thank you very much. Man I really wish I remembered more programming from college.
I've been using that code but changed it to column 6. However, whenever I copy and paste anything into the worksheet or drag values across multiple cells I get a debugging error. I think it says "Error 13, Mismatch Error" or something along those lines. Anyone know how to fix that?
Anyone know how to fix this code so I don't get a "Run-time Error 13. Type Mismatch Error" everytime I copy/paste or fill stuff in the worksheet?Originally Posted by pjoaquin
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks