Fill empty cells (similar to index - match)

jordanbuchan359

New Member
Joined
Jun 15, 2018
Messages
15
Hi,

I'm hoping for a solution to my predicament. I have an external data sheet linked via power query - the table contains names, certifications and identification numbers. My problem is that some of the students names are missing; however, their corresponding ID number has populated in every row... If possible, I'd like to use their ID number to fill in any blanks.

I tried using fill down, but for some reason it wouldn't fill all of the blanks.

Here's an example table:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Certification[/TD]
[TD]Identification[/TD]
[/TR]
[TR]
[TD]Gemma[/TD]
[TD]English[/TD]
[TD]1234[/TD]
[/TR]
[TR]
[TD]Gemma[/TD]
[TD]PE[/TD]
[TD]1234[/TD]
[/TR]
[TR]
[TD]Gemma[/TD]
[TD]Science[/TD]
[TD]1234[/TD]
[/TR]
[TR]
[TD]Gemma[/TD]
[TD]Art[/TD]
[TD]1234[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Drama[/TD]
[TD]1234[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]History[/TD]
[TD]1234[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]French[/TD]
[TD]1234[/TD]
[/TR]
</tbody>[/TABLE]

I tried the following code for a custom column, but was prompted with a Token EOF error for my VAR declaration:

Code:
[COLOR=#000000][FONT=Consolas]VAR Identification = [Identification][/FONT][/COLOR]RETURN
    CALCULATE (
        FIRSTNONBLANK ( [Name], 1 ),
        FILTER (
            ALL,
            [Identification] = Identification
                && [Name] <> BLANK ()
                && [Name] <> ""
        ) [COLOR=#000000][FONT=Consolas]    )[/FONT][/COLOR]

Note - the above code was adapted from the following thread
HTML:
https://community.powerbi.com/t5/Desktop/Fill-empty-cells-based-on-criteria/td-p/101190

Any help would be appreciated.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,223,248
Messages
6,171,021
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top