I think it's an IF Statement

S

Sal

I really hope someone will be able to help me.
I have spreadsheet set up as below
C3, D3, E3, F3 etc containing a number code ie 190 178 200 212
The columns below these number have figures entered. What I need is when I
enter a figure below a certain code, I need the code to be enter in another
column automatically ie.
In cell C8 I will enter £125.50 and the code 190 from cell C3 will need
to be returned in cell W8. Also when I enter another figure in cell C11 I
need it to return 190 again. I have about 12 columns with different numbers.
Would this be a possibility as at the moment I manually enter the codes.
Thanks to all who can help me.
Regards.
Hazel
 
J

JP

You may be right!

In your target cell you can use an IF statement to test for the
condition you want to be true, then insert the result of another cell.

For example, in cell W8, put =IF(NOT(ISBLANK(C8)),C3,"")

This will keep the cell blank until you enter that value into C8.


HTH,
JP
 
S

Sal

Hi
Thank you for your speedy response.

This works perfectly, but I think I may need some nested IFs as I need to it
to return the relevant code for the other 11 columns - any ideas please.
H
 
J

JP

Can you provide another example? I'm having trouble visualizing what
you want.


Thx,
JP
 
S

Sal

Hi
Sorry, it must sound confusing. I will try and explain.

Columns A-O contain codes ie A2 106 B2 114 C2 109 D2 14 etc
In cell B3 I will enter 71.00 and I want it to return 114 the number in cell
B2 into columns 0 in row 3. I will not know what cell the entry will be
made, it could be D4 and I would want it to return 14 in column 0.
The possibility is that along each row the entry could be in any of the
columns and I would need it to return any one of the numbers in cells A2:N2.
Hope this is reasonable clear - not perfect I know!
It would be wonderful if you could provide a solution.
Thanks H
 
D

Dave D-C

Hazel,
Put this in cell W8: =INDEX(C$3:F$3,,MATCH(0,C8:F8,-1))
and copy to any other desired rows.
 
S

Sal

I will try it out. Thank you very much.
H

Dave D-C said:
Hazel,
Put this in cell W8: =INDEX(C$3:F$3,,MATCH(0,C8:F8,-1))
and copy to any other desired rows.
 
D

Dave D-C

(I've boon looking at this more)
MATCH(-9E307, would be better than MATCH(0,
because that would allow negative numbers.
-9E307 is close to the smallest number --
do 'Help''; 'Find'; 307 to get to specifications.
And it works for EITHER numeric or alpha but not both
at the same time. For alpha use MATCH( "",
(I'm XL97) Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

IF statement with CONCATENATE (I think) 2
Need Formula 6
Need more help with formula 2
product code a value 0
If Condition 4
* In IF Statement 4
VBA coding a nested Vlookup, and a sumif formula 5
IF statement 10

Top