Solved

Excel formula, IF statement, shows on spreadsheet and shouldn't

Posted on 2011-03-08
3
293 Views
Last Modified: 2012-05-11
I'm writing a simple macro to check formulas and make sure they're correct on multiple spreadsheets in a given workbook; however, I noticed in one section of the spreadsheets there are formulas that pick up info from the Wednesday schedule.  If that cell on Wednesday schedule is blank then the cell on the other spreadsheets are blank otherwise the content of the Wednesday cell shows, as they should.  However, if I have the macro put the formula into the cell or if I manually write the formula into the cell it shows the formula rather than reading the Wednesday schedule.  It is not formatted to show formulas and if I copy a pre-existing formula and paste it into the cell that shows the formula I wrote, the formula disappears, as it should, on the spreadsheet and can only be seen in the formula bar.  I have no idea how or why this happens.
0
Comment
Question by:RogerKMiller
  • 2
3 Comments
 
LVL 50

Expert Comment

by:teylyn
ID: 35074961
Hello,

can you post the code you are using and/or the workbook? Maybe there is a leading space before the = sign?

cheers, teylyn
0
 
LVL 50

Accepted Solution

by:
teylyn earned 500 total points
ID: 35074972
Make sure the cell is formatted with "General". Sounds like it's formatted to "Text". Copying a formula from another cell will apply the other cell's format, too, so the format gets changed.
0
 

Author Closing Comment

by:RogerKMiller
ID: 35075075
Thank you!  I should have known that!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now