Or =IF(C1 <> "",D1*-1,D1)
Leigh
Main Topics
Browse All TopicsI want to do the following:
If any cell in column c has anything in it, then I want the numbers in column d to be negative numbers. They all have positive numbers now. I have battled with this with no success.
I appreciate any help at all in creating a vba macro that does this. The columns will never change. I am using Excel 2007.
Thanks for any help
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
brettdj,
your solution is fine for a 1 time only. If by any chance this file is active and is revolving and values in C can change in the future then best is:
In a blank column, say column F in F1 put, =IF(C1<>"",-1,1)
copy this formua down
Edit - Copy column F
select Column D
Edit- Paste Special and pick 'Formulas and number format' and 'multiply'
dcncinc, no need to struggle anymore you hv plenty of choices !!!
rgds/gowflow
goflow,
You do realise when you copied my comments and changed only the last few words that you included the typos .... and your small modification:
The formula was right-on but I had to use the Paste Special of Formulas and Number format, then multiply and not just values and mulitply. When I used the values and multiply, some of the numbers were negative when they shouldn't have been. However, when I used Formulas and Number format, then multiply it was great. Thank you, thank you, thank you to everyone. Both of you the solution finders were awesome. You have saved my life you guys!!!
Business Accounts
Answer for Membership
by: brettdjPosted on 2009-11-04 at 15:45:51ID: 25745430
No code neede
Cheers
Dave