For example

If range A14:A200

If A14 = 1 so fill G14 Ok if A14 = 1 so fill G14 Ok and so on

For example if range A14:A200 if A14 = 1 so fill G14 Ok if A15 = 1 so fill G15 Ok and so on

Jan 23, 2023 in Others 365 views

Try this:

```Sub IFSomething()

With Range("A14:A200") reference the needed range
With .Offset(, 6) ' reference the cells 6 columns to the right of referenced range
.FormulaR1C1 = "=IF(RC[-6]=1,""OK"","""")" ' place a formula in referenced range
.Value = .Value ' leave only values
End With
End With

End Sub```
• 63,700 points

Excel:- Comparing 2 columns and then copying value in 3rd column

There is an excel if() function for ...READ MORE

Excel - return a value only if a condition is met via VBA

You could use IIf() DestSheet.Cells(erow, 9).Value = IIf(newuplift = ...READ MORE

VBA Loop to select then copy a range of cells based on value in column B

Try this: Sub Macro2() Dim ...READ MORE

Excel-VBA - How to identify Target range (more than 1 cell) is deleted in a Worksheet_Change function?

You misunderstand the purpose of the function ...READ MORE

Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

Remove formulas from all worksheets in Excel using VBA

Try this : Option Explicit Sub test1() ...READ MORE

Calculate monthly average from daily data without PivotTable

Assuming you have the months in column D enter ...READ MORE

Automate compound annual growth rate (CAGR) calculation

The following PowerPivot DAX formulas worked for ...READ MORE

Excel Formula - if values in columns all contain X then return

You can use the AND function: = IF(AND(A3="OK";B3="OK";C3="OK");"everything ...READ MORE