Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I am trying to have one column that will show the most recent thing i entered in the row. Example: I want B2 to be the same as D2 but once I enter something in E2 I want B2 to display that. And then if I entered something in F3 it would then show in B2 and so on and so fourth. I figured out how to do it with one cell doing a "=index(d2)" and tried something like "=index(D2:L2) for the sequence but it only shows d2 or gets upset and causes errors. I hope that makes sense. It seems simple enough but after researching it I've been unable to find anything. It is mainly text that I am trying to display and not numbers.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

The following little script will add each change you make, in the active row, to column B:

function onEdit() {
  var sh = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  var row = sh.getActiveCell().getRowIndex();
  var value = sh.getActiveCell().getValue();
  sh.getRange(row, 2).setValue(value);
}

See example file I created, you you to play around with: onEdit change

Goto Tools, Script Editor, from the menu and add the script. Make sure to press the two buttons:
enter image description here

share|improve this answer
    
Oh my goodness you're amazing! Thank you so much! Would you happen to know how to copy the notes associated with that cell to be referenced as well? would I do the same script but replace "cell" with note maybe? Anyways, thanks so much again! –  jason lindsay Mar 27 '13 at 14:43
    
also one more little thing, is there any way to make it so the cells preceding it don't affect the cell? ex: When ever I change something in row "A", "b" won't change unless it's something in row "c" or further? –  jason lindsay Mar 27 '13 at 15:09
    
@jasonlindsay best is to ask those questions, separately. –  Jacob Jan Tuinstra Apr 5 '13 at 20:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.