Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88066

fill multiple cells with reference to one cell - VBA [closed]

$
0
0

Is the below case possible in a single VBA code?

If A2 has a value then B2 should return "AAA", C2 should return "BBB", D2 should return "CCC"

I have duplicated the below code multiple times to acheive the above statement..

  Range("G22").Select
ActiveCell.FormulaR1C1 = "=IF((NOT(ISBLANK(RC27))),""N/A"","""")"
Range("G22:G"& Range("R"& Rows.count).End(xlUp).Row).FillDown

Range("H22").Select
ActiveCell.FormulaR1C1 = "=IF((NOT(ISBLANK(RC27))),""N/A"","""")"
Range("H22:H"& Range("R"& Rows.count).End(xlUp).Row).FillDown

Range("I22").Select
ActiveCell.FormulaR1C1 = "=IF((NOT(ISBLANK(RC27))),""N/A"","""")"
Range("I22:I"& Range("R"& Rows.count).End(xlUp).Row).FillDown

comments and advises are welcome... thanks in advance!!


Viewing all articles
Browse latest Browse all 88066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>