Excel VBA If range value something then fills Columns G

0 votes

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 in Others by Kithuzzz
• 27,740 points
32 views

1 answer to this question.

0 votes

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
answered Jan 23 by narikkadan
• 51,240 points

Related Questions In Others

0 votes
1 answer

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

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

answered Jan 8 in Others by narikkadan
• 51,240 points
38 views
0 votes
1 answer

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

answered 5 days ago in Others by narikkadan
• 51,240 points
34 views
0 votes
1 answer

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

answered Sep 23, 2022 in Others by narikkadan
• 51,240 points
1,070 views
0 votes
1 answer

Extract unique value from the range in Excel

The portability of spreadsheet functions like UNIQUE() ...READ MORE

answered Sep 23, 2022 in Others by narikkadan
• 51,240 points
170 views
0 votes
0 answers

Convert Rows to Columns with values in Excel using custom format

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

Feb 17, 2022 in Others by Edureka
• 13,640 points
165 views
0 votes
1 answer

Remove formulas from all worksheets in Excel using VBA

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

answered Oct 3, 2022 in Others by narikkadan
• 51,240 points
254 views
0 votes
1 answer

Calculate monthly average from daily data without PivotTable

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

answered Oct 3, 2022 in Others by narikkadan
• 51,240 points
171 views
0 votes
1 answer

Automate compound annual growth rate (CAGR) calculation

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

answered Oct 7, 2022 in Others by narikkadan
• 51,240 points
255 views
0 votes
1 answer

Excel VBA if file closed, then open and paste, else just paste data

Slightly re-worked to add full workbook/sheet qualifiers ...READ MORE

answered Sep 21, 2022 in Others by narikkadan
• 51,240 points
155 views
0 votes
1 answer

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

answered Nov 4, 2022 in Others by narikkadan
• 51,240 points
88 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP