Needing a UDF for a commission tracker...

brockk

Board Regular
Joined
Jul 1, 2006
Messages
170
Office Version
  1. 2013
Platform
  1. Web
Greetings, I don't think that this is possible by means of formula only. I am needing help to retain the last information/data according to attached picture:

Book1.xlsx
ABCDEFGHIJKLMNOPQRST
1SALES GOAL
220232024202520262027CELL B3 ==IF(Jan!$F$7=B$2,Jan!$H$2,"-")
3JAN65,000----CELL C3 ==IF(Jan!$F$7=C$2,Jan!$H$2,"-")
4FEB-----CELL D3 ==IF(Jan!$F$7=D$2,Jan!$H$2,"-")
5MAR-----CELL E3 ==IF(Jan!$F$7=E$2,Jan!$H$2,"-")each category has the same formula. The only change that occurred is where the value of each category is located . These are:
6APR-----CELL F3 ==IF(Jan!$F$7=F$2,Jan!$H$2,"-")
7MAY-----CELL B4 ==IF(Feb!$F$7=B$2,Feb!$H$2,"-")
8JUN-----CELL C4 ==IF(Feb!$F$7=C$2,Feb!$H$2,"-")
9JUL-----CELL D4 ==IF(Feb!$F$7=D$2,Feb!$H$2,"-")SALES GOAL VALUE IS = TO CELL $H$2 OF CORRESPONDING MONTH
10AUG-----CELL E4 ==IF(Feb!$F$7=E$2,Feb!$H$2,"-")ACTUAL SALES VALUE IS = TO CELL $H$4 OF CORRESPONDING MONTH
11SEP-----CELL F4 ==IF(Feb!$F$7=F$2,Feb!$H$2,"-")COMM. EARNED VALUE IS = TO CELL $H$6 OF CORRESPONDING MONTH
12OCT-----etc.
13NOV-----
14DEC-----I have a template for each month of the year, where I have a drop-down list for the YEARS in cell F7 of each of the worksheets. What I will need is a macro/UDF that can retain the last value for the month of the particular year selected in this worksheet. Example: Jan - 2023 sales goal is 65k (given data from Jan!H2 cell) Jan - 2024 sales goal is 72k (updated from the same cell of the template only changing the year and amount of goal). I would like to retain the 2023 values for all 3 categories (Sales Goal, Actual Sales, Comm. Earned) and not have it get erased from the array so I may later analyze the data. More than likely I don't think that this can be done by formula alone thus, why I am asking for help from someone that knows macro. Any help is truly appreciated.
15
16ACTUAL SALES
1720232024202520262027
18JAN127,128----
19FEB-----
20MAR-----
21APR-----
22MAY-----
23JUN-----
24JUL-----
25AUG-----
26SEP-----
27OCT-----
28NOV-----
29DEC-----
30
31COMMISSIONS EARNED
3220232024202520262027
33JAN25,500----
34FEB-----
35MAR-----
36APR-----
37MAY-----
38JUN-----
39JUL-----
40AUG-----
41SEP-----
42OCT-----
43NOV-----
44DEC-----
45
Sheet1


Any help is truly appreciated!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Any suggestions at this point? Should I consider another route to go, as for the creation of the template. At this point I am completely stumped as I would like it to be all automated and not manually entering the EOM tallies. Thanks in advance for any help/suggestions that may be provided.
 
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