Search : in
By :

How to check multiple cells to return value?

Last answer on Feb 10, 2009 11:22:34 pm GMT sadhya, on Dec 22, 2008 4:44:49 pm GMT 
 Report this message to moderators

Hello,

I am a basic Excel user.

I have an Excel sheet which displays a hierarchy of our institution's org units. The org unit names are listed in order: one per row. Its placement by column designates its level in the hierarchy. In each row, the hierarchical parent org units are not displayed, you have to view the previous row/s to find the hierarchically 'superior' org units. The number codes of each org units are simply listed in one column (column O).

I want to build the hierachy of 'superior' org units for each org unit across the row (so it is standalone), but I want to use the number code (column O) rather than the name.

For example, looking at row 497:
The org unit specified in that row has its name displayed in the H column (it is therefore 8 levels in from the top hierarchical level). Getting the first level number code into cell A is easy as all org units on this sheet share the same first level org unit. So, to fill in the second level of the org unit on row 497, I want to find the first row above it in which column B (org unit name) has a value. Once I find that, I want to copy its number code (cell O) into row 497, cell Q. Once I get that done for all rows and have the number code for the second level org unit filled in their cell Q, I will go about getting the third level org unit number code for each row's cell R.

Just for the Following is the logic I have come up with so far, and I don't know how to enter a formula to achive it. Any help would be appreciated!:

I am thinking, for each row:

if cell B>0 then cell Q= cell O
if cell B is not > 0, then is cell B of the previous row >0?, if not, previous row, previous row, previous row, until a value is found in cell B. Once it is found, then cell Q of the initiating row = cell O of the row in which we found a value in cell B.

BUT, depending on which cell the org unit of any given row is, I should not look for any values past that level to fill in.

Argh. Sorry.

Thank you!

Configuration: Windows XP
Internet Explorer 6.0

Best answers for « How to check multiple cells to return value? » in :
VB6 Finding the RGB values of a color ShowVB6 Finding the RGB values of a color Dim R as integer Dim G as integer Dim B as integer Sub FindRGB(Col As Long) R = &HFF& And Col G = (&HFF00& And Col ) \ 256 B = (&HFF0000 And Col ) \ 65536 End Sub Note: Here...
Download Advanced Find&Replace for Excel ShowDescription This application is designed by Add-in Express LTD. Advanced Find & Replace is an add-on for Microsoft Excel. It allows you to run multiple searches for values, formulas and comments. The search results are displayed in a floating...
Spreadsheets - Cell Selection ShowCell Selection Spreadsheets are powerful tools for working with data. However, to work with data, it is necessary to have tools to rapidly choose the required cells. Line Selection An entire line can be chosen by clicking directly on the line...
Spreadsheet - Formulas ShowIntroduction to Formulas The main use of a spreadsheet is to automate calculations, which means using cells to perform operations based on values in other cells. The spreadsheet recalculates all the values each time a change is made to the value of...
Worksheet - Cells ShowThe Concept of a Cell A "cell" is the intersection between a line (horizontal) and a column (vertical) on a worksheet. Thus, the name of the line combined with the name of the column gives the cell's coordinates (the term address is sometimes also...

1

WD, on Dec 31, 2008 2:48:25 am GMT

What if you use:

P1=1,Q1=0 ,R1=0,.... Z1=concatenate(P1,"-",Q1,"-",R1,...)
P2=1,Q2=if(B2=0,Q1,O2),iR2=if(C2=0,R1,O2)... Z2=concatenate(P2,"-",Q2,"-",R2,....)
P3=1,Q3=if(B3=0,Q2,O3),iR3=if(C3=0,R2,O3)... Z3=concatenate(P3,"-",Q3,"-",R3,....)

And use Z as your unique identifier.

Bob 1 1,0,0 1-0-0
Fred 2 1,2,0 1-2-0
George 3 1,2,3 1-2-3
Bill 4 1,4,3 1-4-3

This can even be dressed up more by resetting each subsequent value (R,S,T,...) to 0 if the value in Q changes

R2=If(Q2<>Q1,0,if(C2=0,R1,O2)

Reply to WD

2

Sharon, on Feb 10, 2009 4:54:48 pm GMT

Maybe you can tell me how to set up a formula to add numbers like the following 8/1 and 8/4 and so on in a column.
Probably simple, I just can't figure it out. Thanks
email is
Smiller6623@hotmail.com

Reply to Sharon

3

 Helper, on Feb 10, 2009 11:22:34 pm GMT

If you want to get the sum of all numbers to the left and right of the "/" maybe you could try this.


SUM OF THE NUMBERS 8/1, NOW SUM OF THE NUMBERS 8/4.
=SUM(LEFT(A1,1))+SUM(RIGHT(A1,1),LEFT(A2,1)+SUM(RIGHT(A2,1)))

Reply to Helper