• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

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

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
RogerKMiller
Asked:
RogerKMiller
  • 2
1 Solution
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
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
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
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
 
RogerKMillerAuthor Commented:
Thank you!  I should have known that!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now