简体   繁体   中英

Excel - replace a formula cell with its result automatically

I am trying to make a sheet to add to templates that I give to my students for homework assignments; some of them are cheating by sending each other the files and I would like to catch them.

I have made a formula cell that populates with the current OS and directory of the file. What I would like to do is have this become text after evaluation so that if another student opens the file it will not change (but the following cell will, and so on..) Here is the formula:

(Cell A1): =INFO("osversion")&INFO("directory")

(Cell A2 and beyond): =IF(A1=(INFO("osversion")&INFO("directory")),"",IF(LEN(A1)<2," ",INFO("osversion")&INFO("directory")))

Do you know if there is any way to have a formula cell be replaced by its value after execution without using VBA? (If I use VBA it asks if you want to enable macros on startup which kind of gives the game away...)

Thank you in advance for your help!

There is a workaround: Use Track Changes. If you are using Excel 2010, for example:

  1. Go to the Review tab and in the Changes group click Share Workbook .
  2. Click the checkbox for Allow changes by more than one user at the same time .
  3. In the Review tab, select Track Changes|Highlight Changes .
  4. You may wish to select All for the When option and Everyone for the Who option.

You can then choose to highlight changes on screen and/or list changes in a new sheet.

If you do that before you make your final changes to the file, you can confirm that nobody has Accepted Changes between the last time you saw the file and the time it is returned to you by checking that your last change is shown correctly.

That will then let you see all the people who have edited the file since you last edited it, and what changes they have made.

(EDIT)

As @Siddharth Rout pointed out in another answer, one can use technological means to make cheating on assignments more difficult but a sufficiently resourceful student can always find a way to circumvent such measures.

This predicament can be resolved by distinguishing two cases:

(a) learning opportunities where students can choose to learn (do the assignment and get feedback on their approach - not a mark) or not choose to learn, and

(b) evaluation processes where one can measure how much they have learned (eg by getting the students together under one roof).

In case (a) students are not being evaluated and so have no motivation to "cheat". In case (b), they are being evaluated but have no opportunity to cheat.

Do you know if there is any way to have a formula cell be replaced by its value after execution without using VBA ?

The answer to your question is " No, it cannot be done "


Even if you considered VBA as an option, it's futile as this is a classic example of XY Problem .

No matter what you do, you cannot stop your students from cheating. Consider these few scenarios.

Scenario 1

Student A has 1.xlsx . Student B has 2.xlsx . After student A finishes his/her assignment, he/she create a copy of 1.xlsx . Let's call it Copy.xlsx . Now Student A gives Copy.xlsx to Student B. Student B opens Copy.xlsx and copies the answers into 2.xlsx . Once finished, Student B deletes Copy.xlsx and gives you 2.xlsx . So now tell me how will you know Student B cheated?

Scenario 2

Student B calls Student A on mobile. They both have their copies opened. Student A gives all the answers on the phone. How will you know Student B cheated?

Scenario 3

Student A and Student B open files in two laptops next to each other and finish the assignment. How would you know who cheated whose assignment?

Alternative?

Get all the students under one roof and then get them fill it up in front of you. There is no other way you can even guess whether someone cheated unless someone is fool enough to mention other students name in his/her template or copied the answers verbatim.

You could always put some text in a cell location that only you know about and make the text white. You could code your text for each student and lock only the contents of that one cell with a password.

That's what I would do...

You can give each of them a different problem (maybe the same problem with different data). You will detect cheating of any kind by just looking at the results.

Programming or IT is not always the solution, even to programming or IT problems.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM