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

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
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,215,379
Messages
6,124,607
Members
449,174
Latest member
ExcelfromGermany

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