Cell value used to input a LETTER in another cell.

JDSOuth49

New Member
Joined
Feb 16, 2024
Messages
46
Office Version
  1. 365
Platform
  1. Windows
I am having issues completing this formula:

=IF(S15<=7,E15=N, IF(S15>=8,E15=Y,0)

Purpose:

  • When cell (S15) is less than or equal to 7, I want an “N” to be placed in Cell (E15).
  • When cell (S15) is greater than or equal to 8, I want an “Y” to be placed in Cell (E15).
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Right-click on your sheet name -> View Code -> Paste this into the editor.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim KeyCells As Range
    Dim rng As Range
    Dim cell As Range
    Set KeyCells = Me.Range("S15:S" & Me.Rows.Count)
    If Not Application.Intersect(KeyCells, Target) Is Nothing Then
        Application.EnableEvents = False
        For Each cell In Target
            If cell.Value < 8 Then
                Me.Cells(cell.Row, "E").Value = "N"
            Else
                Me.Cells(cell.Row, "E").Value = "Y"
            End If
        Next cell
        Application.EnableEvents = True
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top