Excel Formula with Logic Needed

Panama1182

New Member
Joined
Apr 3, 2018
Messages
23
I need an excel formula with proper logic to copy the value of the cell above given certain criteria. Cell A377-Cell A747 needs to equal cell A376. Cell A748 is a different name but should stay that way because Cell C748 reads "Department 000." Essentially I want a formula that can understand that anytime it reads "Department 000" in Column C then the name in Column A is correct. For every cell below "Department 000" through "All Department Num" the correct value in Cells A should be the name of the closest cell above them where Column C reads "Department 000."
 

Attachments

  • ex1.PNG
    ex1.PNG
    19 KB · Views: 7
  • ex2.PNG
    ex2.PNG
    45.6 KB · Views: 7

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Is this what you are looking for (you do not mention where to put the new data so I picked the column F):

Excel Formula:
=IF(C376="Department 000",A376,F375)
 
Upvote 0
Not really sure what that reply is trying to say.
Did it work for you?
 
Upvote 0
No it did not.

I need a formula in cell A5 to repeat the name in cell B4 until the name changes in B376. Once it changes, I want the new name to be repeated in cell A377 until the name changes again. The names in column B change every time "Department 000" appears in column D. Same range of departments repeated from "Department 000 - Department 969" and "All Department Num" as shown in screenshot. Whenever it does not show "Department 000" then it will be a blank in any cell in Column B.
 

Attachments

  • ex3.PNG
    ex3.PNG
    38.4 KB · Views: 4
Upvote 0
A few questions:
1) Which version of Excel are you using?
2) Do the rows have some values like you showed already in Col A or it's completely blank?
 
Upvote 0
I am using Microsoft office professional plus 2019. The rows will be completely blank aside from the departments listed in column D.
 
Upvote 0
If I understand correctly, try this:
Book2
ABCD
4AADepartment 000
5ADepartment 001
6ADepartment 002
7ADepartment 003
8ADepartment 004
9ADepartment 005
10ADepartment 006
11ADepartment 007
12ADepartment 008
13ADepartment 009
14ADepartment 010
15ADepartment 011
16ADepartment 012
17ADepartment 013
18BBDepartment 000
19BDepartment 001
20BDepartment 002
21BDepartment 003
22BDepartment 004
23BDepartment 005
24BDepartment 006
25BDepartment 007
26BDepartment 008
27BDepartment 009
28BDepartment 010
29BDepartment 011
30BDepartment 012
31BDepartment 013
Sheet7
Cell Formulas
RangeFormula
A4:A31A4=LOOKUP(2,1/($D$4:D4="Department 000"),$B$4:B4)
 
Upvote 1
Solution

Forum statistics

Threads
1,221,508
Messages
6,160,222
Members
451,631
Latest member
coffiajoseph

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