A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
A-mazing.
I have tried both scripts, the macro that I click to run, and the previous, which runs "automatically".
The macro where I hit "play" to run works exactly like I want!!!
Question regarding the other: When I drag the cell box thing (with that square in the corner) down from the cell directly above one with #N/A, the pop up box has the correct "long text", prompting me for the correct abbreviation.
However, if I drag down from a cell that's more than one above it, it seems to be giving me the incorrect "long text"...Here's the script:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim str As String
Dim rng As Range, c As Range
If Not Intersect(Target, Range("O:O")) Is Nothing Then
Set rng = Intersect(Target, Range("O:O"))
For Each c In rng
If IsError(c.Value) Then
If c.Value = CVErr(xlErrNA) Then
Application.EnableEvents = False
c.Select
str = InputBox("What should the abbreviation be?" & vbCr & vbCr _
& Cells(Target.Row, "N").Value _
, "What should this be?")
If str <> "" Then c.Value = str
Application.EnableEvents = True
End If
End If
Next c
End If
End Sub
edit: and in the Immediate Window, "?application.enableevents" returns "True"