Help with some formulas

zendog1960

Active Member
Joined
Sep 27, 2003
Messages
459
Office Version
  1. 2019
Platform
  1. Windows
I have a spread sheet I am trying to get working. Here is the form so far:
Book1.xls
ABCDEFGHIJ
1PhilTom
2Week 1Week 2Week 3Week 1Week 1
3PhilTomA = AbsentWeek 2Week 2
4BradDougP = PresentWeek 3Week 3
5GuyGuy(Blank) = Future DateBradDoug
6JimJimWeek 1Week 1
7TonyDaveWeek 2Week 2
8Week 3Week 3
9GuyJim
10Week 1Week 1
11Week 2Week 2
12Week 3Week 3
13TonyDave
14Week 1Week 1
15Week 2Week 2
16Week 3Week 3
Sheet1



Here is what I am trying to do. Each week, any of the 8 people shown could be present at this function. Each week we write who is there. I would like to have a formula that will place in columns H or J, an 'A' for Absent for the weeks they are not on the list; a 'P' if they are present that week and a blank if t hat week hasn't yet happened.

The weeks that have not happened yet will be blank by default but if the fumula needs to be written to force the blank, I am ok with that. I thought vlookup or match would work but that only uses the data in the arrays and doesn't allow to manually place data that isn't in the array as far as I know.

Any thoughts? This is really perplexing to me and I am sure it really is simple. I just cannot get my head around this.

please help!
 
Domenic, I am not sure why you are using the 'MOD' and "ROW' functions here. I am still learning Excel and all it's functions. Can you explain why the use of these two functions and why they might be better that say the formula that Bill H suggested. I have tried looking it up in help but we all know, the help doesn't always explain it in terms anyone except the programmers can understand.

I look forward to the explaination!

With the formula entered in H2, ROW()-ROW(H$2) returns 0. When copied to H3, it returns 1. So, the formula returns the following array of numbers for Column H...

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14

With the formula entered in H2...

MOD(ROW()-ROW(H$2),4) ---> MOD(0,4) --> 0

When the formula is copied to H3...

MOD(ROW()-ROW(H$2),4) ---> MOD(1,4) --> 1

So, the formula returns the following array of numbers for Column H...

0
1
2
3
0
1
2
3
0
1
2
3
0
1
2

Notice that 3's appear on rows where there's a name. So the IF statement is evaluated as true if the result returned by MOD(ROW()-ROW(..),...) is not equal to 3.

The difference between the two is that with Bill's solution the references will have to be changed for each week, whereas my formula can be copied to other cells without having to make any changes. Of course, the references, MOD divisor, etc., will need to be changed accordingly.
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,214,421
Messages
6,119,392
Members
448,891
Latest member
tpierce

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