VBA & Macro Problems

Populate a Result Column in Excel with an IF Formula or VBA Event

Rana GarciaRana Garcia Nov 18, 2026 869 views

Question details

Populate column L with “waive admin fee” when the corresponding value in column K is greater than 0 and less than or equal to 10, and leave it blank otherwise.

Populate an Excel Result Column with an IF Formula or VBA Event
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet needs a result in column L based on the value in column K of the same row.
Observed behavior
Column L should show the fee waiver text for qualifying values and appear blank when the condition is not met.
Before you start

Check whether column K contains manually entered values or formulas, and confirm that column L is available for results. The formula method works with either source; the VBA event must match how column K changes.

Solution 1Recommended

Use an IF formula in column L

Use this method for a simple result that updates when column K changes, including when K contains formulas.

1
Enter the formula

Select cell L2 and enter =IF(AND(K2>0,K2<=10),"waive admin fee","").

2
Fill down

Drag the fill handle from L2 down through the rows that need results, or copy L2 and paste it into the remaining cells in column L.

3
Check the results

Enter or check values in column K: 10 should show “waive admin fee” in column L, while 0 and values above 10 should display a blank.

Use an IF formula in column L
Blank-looking results: When the condition is false, the cell contains a formula returning an empty string; it is not an empty cell.
WPS Spreadsheets

Populate the fee waiver column in WPS Spreadsheets

Use the same IF and AND formula in WPS Spreadsheets to display the fee waiver text for qualifying values and update the result as column K changes.

  1. 1. Open the workbook: Open WPS Spreadsheets, choose Open, and select your workbook.
  2. 2. Enter the formula: Select L2 and enter =IF(AND(K2>0,K2<=10),"waive admin fee","").
  3. 3. Apply it to other rows: Drag the fill handle from L2 down column L, then check the results against the values in column K.
  4. 4. Save the workbook: Choose Menu > Save As and select an Excel workbook format if you need to share the file with Excel users.
Automatically displays the fee waiver result for values greater than 0 and at most 10Opens and saves Microsoft Excel .xlsx filesOffers a familiar spreadsheet interfaceProvides a free way to work with spreadsheet formulas
microsoft office alternative - wps office

Frequently Asked Questions

Does the condition include 0 and 10?

It excludes 0 and includes 10. The tests K2>0 and K2<=10 display the waiver text only for values in that range.

Why doesn't Worksheet_Change respond when a formula in column K recalculates?

Worksheet_Change responds to edits, not changes in calculated results. Use the IF formula in column L or add a Worksheet_Calculate event to the worksheet's code window.

Can I paste multiple values into column K at once?

Yes. The Worksheet_Change code loops through all edited cells within K2:K1048576 and updates their adjacent cells in column L.

Why does a blank-looking formula cell still contain a formula?

The IF formula returns an empty string when the condition is false. Select the cell and check the formula bar to see the formula; use a VBA clearing method if the cell must have no content.

How do I keep the VBA event when saving the workbook?

In Excel, choose File > Save As and select Excel Macro-Enabled Workbook (.xlsm). Macros must also be enabled for the event to run.