Create Script Button to Add Selected Values to the Next empty Row in the sheet

shaunreeder

New Member
Joined
Aug 10, 2022
Messages
3
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
Hello,

New here and wondered if I could get some assistance with this.

I've been trying to figure this out for days and cant seem to get it right.

I have a Dashboard that will be used by multiple people to enter data for reporting.

The common issue is people using the same rows or leaving blank rows which messes up the pivot tables etc.

What I am trying to do is create two buttons on the top of the worksheet that will automatically go to and fill the next empty row(s) with the data needed for that report button selected with the parameters that the user inputs on the top like below:

1660140721374.png


Every Monday a weekly report is completed. Weekly Reports contain 2 metrics to report on.
Every FIRST Monday, monthly report are completed. Monthly Reports contain 8 metrics to report, including the weekly report with it.

Using the Weekly Button would result in it finding the next 2 empty rows on the table and filling Columns A,B,C & E (each row for E would contain the metric needed) like below:

1660141097773.png


For the Monthly button it would do the same thing as the weekly button but also add the monthly reports as well, adding the next 8 rows instead of 2 with the metrics for the weekly and monthly reports listed in Col. E like below:

1660141119534.png



Any help is appreciated. It seems pretty simple but I'm new and seem to cant get it ironed out.

2022 PCP Dashboard2.xlsx
ABCDEFGHIJ
1Choose Report Type Here ->WeeklyChoose Report Week Here ->1/17/2022Choose Provider Here ->Test, TestMONTHLY BUTTON HEREWEEKLY BUTTONEHERE
2Report TypeReport Week/MonthProvider (Use drop down box)LocationObjectiveActualCommentsMonth/YearTargetStretch
3Weekly3/11/2024Salvo, AnthonyHammontonAtlantiCare First0.72020240.6000.615
4Weekly2/19/2024Vu, DinhGalloway SouthMissing Charges0.650202410.0000.000
5Weekly1/15/2024Paradela, Ephrem HectorEHTAtlantiCare First0.61820240.6000.615
6Weekly1/22/2024Berlin, WilliamTuckertonMissing Charges0.000202410.0000.000
7Weekly2/19/2024Kerstetter, KathleenGalloway SouthMissing Charges1.00020241.0000.000
8Weekly3/11/2024Adames Mendez, WidalysGalloway SouthMissing Charges2.000202410.0000.000
9Monthly7/4/2022Sharma, SoniaHammontonDaily Visits1,500.0002022342.000380.000
10Weekly1/8/2024Almanzar, RandyPleasantvilleMissing Charges0.000202410.0000.000
11Monthly5/2/2022Bennett, HollyGalloway SouthNo show rate0.30020220.0500.030
12Weekly1/29/2024Beenstock, StevenManahawkinAtlantiCare First0.97020240.4000.415
13Weekly2/26/2024Barrios, CristianManahawkinMissing Charges0.000202410.0000.000
14Weekly1/30/2022Amin, AnilaMays Landing - GeriatricsMissing Charges1.000202210.0000.000
15Monthly3/7/2022Test, TestEHTDaily Visits372.0002022342.000380.000
16Monthly8/1/2022Test, TestEHTDaily Visits250.0002022342.000380.000
17Weekly8/29/2022Test, TestEHTMissing Charges0.000202210.0000.000
18Monthly4/4/2022Test, TestEHTDaily Visits192.0002022342.000380.000
19Monthly5/2/2022Test, TestEHTDaily Visits205.0002022342.000380.000
20Monthly7/4/2022Test, TestEHTDaily Visits126.0002022342.000380.000
21Monthly7/4/2022Test, TestEHTWellness Visit % Completion0.12620220.4300.440
22Monthly7/4/2022Test, TestEHTPanel size855.00020221,600.0001,800.000
23Monthly7/4/2022Test, TestEHTNo show rate0.14320220.0500.030
24Monthly7/4/2022Test, TestEHTRVU Production281.00020224,200.0004,800.000
25Monthly8/1/2022Test, TestEHTNo show rate0.00020220.0500.030
26Monthly8/1/2022Test, TestEHTRVU Production1,025.00020224,200.0004,800.000
27Monthly8/1/2022Test, TestEHTPanel size1,825.00020221,600.0001,800.000
28Monthly8/1/2022Test, TestEHTRate the Provider Score0.85620220.8810.891
29Monthly8/1/2022Test, TestEHTWellness Visit % Completion0.67820220.4300.440
30Monthly1/3/2022Test, TestEHTDaily Visits365.0002022342.000380.000
31Weekly1/17/2022Test, TestEHTMissing Charges0.000202210.0000.000
32Monthly5/2/2022Test, TestEHTRate the Provider Score0.95620220.8810.891
33Weekly1/3/2022Test, TestEHTAtlantiCare First20220.6000.615
34Weekly1/3/2022Test, TestEHTMissing Charges202210.0000.000
35Monthly1/3/2022Test, TestEHTDaily Visits2022342.000380.000
36Monthly1/3/2022Test, TestEHTNo show rate20220.0500.030
37Monthly1/3/2022Test, TestEHTPanel size20221,600.0001,800.000
38Monthly1/3/2022Test, TestEHTRate the Provider Score20220.8810.891
39Monthly1/3/2022Test, TestEHTRVU Production20224,200.0004,800.000
40Monthly1/3/2022Test, TestEHTWellness Visit % Completion20220.4300.440
41    
Data Entry 2022
Cell Formulas
RangeFormula
H3:H41H3=IF($B3="","",TEXT($B3,"YYYY"))
I3:I41I3=IF($E3="","",(IF($L3="Physician",INDEX(PHYSICIANTARGETS[Target],MATCH(1,(PHYSICIANTARGETS[Metric]=$E3)*IF($E3="Atlanticare First",$Q3=PHYSICIANTARGETS[FTE/Market],$M3=PHYSICIANTARGETS[FTE/Market]),0)),IF($L3="APN",INDEX(APNTARGETS[Target],MATCH(1,(APNTARGETS[Metric]=$E3)*IF($E3="Atlanticare First",$Q3=APNTARGETS[FTE/Market],$M3=APNTARGETS[FTE/Market]),0))))))
J3:J41J3=IF($E3="","",IF($L3="Physician",INDEX(PHYSICIANTARGETS[Stretch],MATCH(1,(PHYSICIANTARGETS[Metric]=$E3)*IF($E3="Atlanticare First",$Q3=PHYSICIANTARGETS[FTE/Market],$M3=PHYSICIANTARGETS[FTE/Market]),0)),IF($L3="APN",INDEX(APNTARGETS[Stretch],MATCH(1,(APNTARGETS[Metric]=$E3)*IF($E3="Atlanticare First",$Q3=APNTARGETS[FTE/Market],$M3=APNTARGETS[FTE/Market]),0)))))
D3:D41D3=IFERROR(VLOOKUP($C3,ProviderTable,4,FALSE),"")
Press CTRL+SHIFT+ENTER to enter array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2Expression=AND(ISBLANK($F2), NOT(ISBLANK($E2)))textYES
F2Expression=ISBLANK($A2)textNO
D2Expression=AND(ISBLANK($F2), NOT(ISBLANK($E2)))textYES
D2Expression=ISBLANK($A2)textNO
B2Expression=AND(ISBLANK($F2), NOT(ISBLANK($E2)))textYES
A3:Q49999Expression=AND(ISBLANK($F3), NOT(ISBLANK($E3)))textYES
B3:G49999Expression=ISBLANK($A3)textNO
H3:Q49999Expression=ISBLANK($E3)textNO
Cells with Data Validation
CellAllowCriteria
G13:G17List=IF($A13="Weekly",Weekly,IF($A13="Monthly",Monthly,"Select Report Type First"))
G1List=Provider_List
B1List=INDIRECT("ReportingSchedule[Reporting Schedules]")
A3:A49999List=INDIRECT("ReportingSchedule[Reporting Schedules]")
B3:B49999List=IF($A3="Weekly",Weekly,IF($A3="Monthly",Monthly,"Select Report Type First"))
C3:C49999List=Provider_List
E3:E41List=IF($A3="Weekly",Weekly_List,IF($A3="Monthly",Monthly_List,"Select Report Type First"))
D1List=IF($B1="Weekly",Weekly,IF($B1="Monthly",Monthly,"Select Report Type First"))
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hello,

New here and wondered if I could get some assistance with this.

I've been trying to figure this out for days and cant seem to get it right.

I have a Dashboard that will be used by multiple people to enter data for reporting.

The common issue is people using the same rows or leaving blank rows which messes up the pivot tables etc.

What I am trying to do is create two buttons on the top of the worksheet that will automatically go to and fill the next empty row(s) with the data needed for that report button selected with the parameters that the user inputs on the top like below:

View attachment 71262

Every Monday a weekly report is completed. Weekly Reports contain 2 metrics to report on.
Every FIRST Monday, monthly report are completed. Monthly Reports contain 8 metrics to report, including the weekly report with it.

Using the Weekly Button would result in it finding the next 2 empty rows on the table and filling Columns A,B,C & E (each row for E would contain the metric needed) like below:

View attachment 71264

For the Monthly button it would do the same thing as the weekly button but also add the monthly reports as well, adding the next 8 rows instead of 2 with the metrics for the weekly and monthly reports listed in Col. E like below:

View attachment 71265


Any help is appreciated. It seems pretty simple but I'm new and seem to cant get it ironed out.

2022 PCP Dashboard2.xlsx
ABCDEFGHIJ
1Choose Report Type Here ->WeeklyChoose Report Week Here ->1/17/2022Choose Provider Here ->Test, TestMONTHLY BUTTON HEREWEEKLY BUTTONEHERE
2Report TypeReport Week/MonthProvider (Use drop down box)LocationObjectiveActualCommentsMonth/YearTargetStretch
3Weekly3/11/2024Salvo, AnthonyHammontonAtlantiCare First0.72020240.6000.615
4Weekly2/19/2024Vu, DinhGalloway SouthMissing Charges0.650202410.0000.000
5Weekly1/15/2024Paradela, Ephrem HectorEHTAtlantiCare First0.61820240.6000.615
6Weekly1/22/2024Berlin, WilliamTuckertonMissing Charges0.000202410.0000.000
7Weekly2/19/2024Kerstetter, KathleenGalloway SouthMissing Charges1.00020241.0000.000
8Weekly3/11/2024Adames Mendez, WidalysGalloway SouthMissing Charges2.000202410.0000.000
9Monthly7/4/2022Sharma, SoniaHammontonDaily Visits1,500.0002022342.000380.000
10Weekly1/8/2024Almanzar, RandyPleasantvilleMissing Charges0.000202410.0000.000
11Monthly5/2/2022Bennett, HollyGalloway SouthNo show rate0.30020220.0500.030
12Weekly1/29/2024Beenstock, StevenManahawkinAtlantiCare First0.97020240.4000.415
13Weekly2/26/2024Barrios, CristianManahawkinMissing Charges0.000202410.0000.000
14Weekly1/30/2022Amin, AnilaMays Landing - GeriatricsMissing Charges1.000202210.0000.000
15Monthly3/7/2022Test, TestEHTDaily Visits372.0002022342.000380.000
16Monthly8/1/2022Test, TestEHTDaily Visits250.0002022342.000380.000
17Weekly8/29/2022Test, TestEHTMissing Charges0.000202210.0000.000
18Monthly4/4/2022Test, TestEHTDaily Visits192.0002022342.000380.000
19Monthly5/2/2022Test, TestEHTDaily Visits205.0002022342.000380.000
20Monthly7/4/2022Test, TestEHTDaily Visits126.0002022342.000380.000
21Monthly7/4/2022Test, TestEHTWellness Visit % Completion0.12620220.4300.440
22Monthly7/4/2022Test, TestEHTPanel size855.00020221,600.0001,800.000
23Monthly7/4/2022Test, TestEHTNo show rate0.14320220.0500.030
24Monthly7/4/2022Test, TestEHTRVU Production281.00020224,200.0004,800.000
25Monthly8/1/2022Test, TestEHTNo show rate0.00020220.0500.030
26Monthly8/1/2022Test, TestEHTRVU Production1,025.00020224,200.0004,800.000
27Monthly8/1/2022Test, TestEHTPanel size1,825.00020221,600.0001,800.000
28Monthly8/1/2022Test, TestEHTRate the Provider Score0.85620220.8810.891
29Monthly8/1/2022Test, TestEHTWellness Visit % Completion0.67820220.4300.440
30Monthly1/3/2022Test, TestEHTDaily Visits365.0002022342.000380.000
31Weekly1/17/2022Test, TestEHTMissing Charges0.000202210.0000.000
32Monthly5/2/2022Test, TestEHTRate the Provider Score0.95620220.8810.891
33Weekly1/3/2022Test, TestEHTAtlantiCare First20220.6000.615
34Weekly1/3/2022Test, TestEHTMissing Charges202210.0000.000
35Monthly1/3/2022Test, TestEHTDaily Visits2022342.000380.000
36Monthly1/3/2022Test, TestEHTNo show rate20220.0500.030
37Monthly1/3/2022Test, TestEHTPanel size20221,600.0001,800.000
38Monthly1/3/2022Test, TestEHTRate the Provider Score20220.8810.891
39Monthly1/3/2022Test, TestEHTRVU Production20224,200.0004,800.000
40Monthly1/3/2022Test, TestEHTWellness Visit % Completion20220.4300.440
41    
Data Entry 2022
Cell Formulas
RangeFormula
H3:H41H3=IF($B3="","",TEXT($B3,"YYYY"))
I3:I41I3=IF($E3="","",(IF($L3="Physician",INDEX(PHYSICIANTARGETS[Target],MATCH(1,(PHYSICIANTARGETS[Metric]=$E3)*IF($E3="Atlanticare First",$Q3=PHYSICIANTARGETS[FTE/Market],$M3=PHYSICIANTARGETS[FTE/Market]),0)),IF($L3="APN",INDEX(APNTARGETS[Target],MATCH(1,(APNTARGETS[Metric]=$E3)*IF($E3="Atlanticare First",$Q3=APNTARGETS[FTE/Market],$M3=APNTARGETS[FTE/Market]),0))))))
J3:J41J3=IF($E3="","",IF($L3="Physician",INDEX(PHYSICIANTARGETS[Stretch],MATCH(1,(PHYSICIANTARGETS[Metric]=$E3)*IF($E3="Atlanticare First",$Q3=PHYSICIANTARGETS[FTE/Market],$M3=PHYSICIANTARGETS[FTE/Market]),0)),IF($L3="APN",INDEX(APNTARGETS[Stretch],MATCH(1,(APNTARGETS[Metric]=$E3)*IF($E3="Atlanticare First",$Q3=APNTARGETS[FTE/Market],$M3=APNTARGETS[FTE/Market]),0)))))
D3:D41D3=IFERROR(VLOOKUP($C3,ProviderTable,4,FALSE),"")
Press CTRL+SHIFT+ENTER to enter array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2Expression=AND(ISBLANK($F2), NOT(ISBLANK($E2)))textYES
F2Expression=ISBLANK($A2)textNO
D2Expression=AND(ISBLANK($F2), NOT(ISBLANK($E2)))textYES
D2Expression=ISBLANK($A2)textNO
B2Expression=AND(ISBLANK($F2), NOT(ISBLANK($E2)))textYES
A3:Q49999Expression=AND(ISBLANK($F3), NOT(ISBLANK($E3)))textYES
B3:G49999Expression=ISBLANK($A3)textNO
H3:Q49999Expression=ISBLANK($E3)textNO
Cells with Data Validation
CellAllowCriteria
G13:G17List=IF($A13="Weekly",Weekly,IF($A13="Monthly",Monthly,"Select Report Type First"))
G1List=Provider_List
B1List=INDIRECT("ReportingSchedule[Reporting Schedules]")
A3:A49999List=INDIRECT("ReportingSchedule[Reporting Schedules]")
B3:B49999List=IF($A3="Weekly",Weekly,IF($A3="Monthly",Monthly,"Select Report Type First"))
C3:C49999List=Provider_List
E3:E41List=IF($A3="Weekly",Weekly_List,IF($A3="Monthly",Monthly_List,"Select Report Type First"))
D1List=IF($B1="Weekly",Weekly,IF($B1="Monthly",Monthly,"Select Report Type First"))
Also, The file has to be used in the Excel web so using VBA/Macros arent allowed for forms.
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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