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

Fill cells based on value in adjacent cell

$
0
0

I have this working macro button that will "reset all status" in the range B2:B15 to a default prompt for my colleagues to indicate job's status:

screenshot

Private Sub CommandButton1_Click()

    Sheets("Sheet1").Range("B2:B15").Value = "please enter status"

End Sub

I want this macro to stop populating the value "please enter status" in the B column if there are no values in adjacent A column. Looking at screenshot it would leave B6:B15 empty. Column A values are vlookup results. If no result, vlookup returns zeros (currently hidden in white font with the help of conditional formatting)

Appreciate your help!


Viewing all articles
Browse latest Browse all 88066

Trending Articles



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