ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   what's wrong with this function? (https://www.excelbanter.com/excel-discussion-misc-queries/257239-whats-wrong-function.html)

DogmaDot

what's wrong with this function?
 
COLUMN B
r1 Grant Number
r2 NNX08AE13G S01
r3 NNX07AJ55G S01
r4 NNX08AE20G S03
r5 NNX08AE20G S02
r6 NNX10AF75G


COLUMN H Gives anticipated results
r1 SUPPL?
r2 =(MID(B2,12,1)) checks for supp flag (S)
r3 S
r4 S
r5 S
r6 blank


COLUMN I
r1 WHICH-SUPPL? this column repeats the function in all columns
r2 =MID(B2,13,2)
r3 "
r4 "
r5 "
r6 "


COLUMN J
r1 NOT-SUPPL this column repeats either function in all columns
r2 =if(H2<"S","00")
r3 =IF(H3="S",MID(B3,13,2))
r4 "
r5 "
r6 "


When I first typed in the mid function in Column I,
then copied it to the rest of the column, I got the expected
01, 01, 03, 02 and "false" for the for the row w/o an S but
when I tried to use the if statement, the function is repeated;
Now the mid function won't work at all.

Column J won't work at all.

What is wrong with the functions? or have I set something incorrectly?




Russell Dawson[_2_]

what's wrong with this function?
 
In J2 try

=IF(H2="s",MID(B2,13,2),"00")

Some of the descriptions are vague (I don't understand how you expect j2 and
j3 to work as described) but it appears that you were perhaps losing it by
the time you got to col J. It looks like you came at it from the wrong angle
and hopefully my solution is what you are looking for. If not, let's try
again.
--
Russell Dawson
Excel Student

Please hit "Yes" if this post was helpful.


"DogmaDot" wrote:

COLUMN B
r1 Grant Number
r2 NNX08AE13G S01
r3 NNX07AJ55G S01
r4 NNX08AE20G S03
r5 NNX08AE20G S02
r6 NNX10AF75G


COLUMN H Gives anticipated results
r1 SUPPL?
r2 =(MID(B2,12,1)) checks for supp flag (S)
r3 S
r4 S
r5 S
r6 blank


COLUMN I
r1 WHICH-SUPPL? this column repeats the function in all columns
r2 =MID(B2,13,2)
r3 "
r4 "
r5 "
r6 "


COLUMN J
r1 NOT-SUPPL this column repeats either function in all columns
r2 =if(H2<"S","00")
r3 =IF(H3="S",MID(B3,13,2))
r4 "
r5 "
r6 "


When I first typed in the mid function in Column I,
then copied it to the rest of the column, I got the expected
01, 01, 03, 02 and "false" for the for the row w/o an S but
when I tried to use the if statement, the function is repeated;
Now the mid function won't work at all.

Column J won't work at all.

What is wrong with the functions? or have I set something incorrectly?





All times are GMT +1. The time now is 05:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com