Simple IF

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,226
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
I know its simplest..still I need since I made mistake

Input Cell: B2 which can be EITHER of “d2” or “d3” or “d4” or “d5”. That’s All

Output Cell: D2:
IF B2=”d2” THEN D2=”k3
IF B2=”d3” THEN D2=”k4
IF B2=”d4” THEN D2=”k5
IF B2=”d5” THEN D2=”k6

How to accomplish?
I am using Excel 2007
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
=INDEX({"k3";"k4";"k5";"k6"}, MATCH(B2, {"d2";"d3";"d4";"d5"}, 0))
 
Upvote 0
Another way
=IF(B2="","","k"&RIGHT(B2,1)+1)
 
Upvote 0
Another way
=IF(B2="","","k"&RIGHT(B2,1)+1)
Yes .........its another way .......but I may need "k300" also......so can't figure out how to use your formula. The FIRST alphabet is "k" followed by POSITIVE INTEGER.........which depends on another cell's formula.
 
Upvote 0
My suggestion was simply based on your original description.
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0
Glad we could help & thanks for the feedback
I want to ‘fill’ G2:G11 with FORMULAS ‘matching’ the text in B2

IF B2=”d2” THEN G2:G11 should be ‘filled’ with FORMULAS ‘=F3’, ‘=F4’ & so on till ‘=F12’

Similarly, IF B2=”d3” THEN G2:G11 should be ‘filled’ with FORMULAS ‘=F4’, ‘=F5’ & so on till ‘=F13’
Similarly, IF B2=”d4” THEN G2:G11 should be ‘filled’ with FORMULAS ‘=F5’, ‘=F6’ & so on till ‘=F14’

In other words, IF 2 is SUFFIXED in B2’s text (‘d2’), THEN G2 SHOULD START WITH 3 (2+1) AS SUFFIX of F (constant alphabet) & so the FORMULA in G2 would be ‘=F3” & G3 would be ‘=F4” & so on till G11

Formulas needed for G2:G11

How to accomplish?
Sheet1

BCDEFG
d2
d3
d4
d5

<colgroup><col style="FONT-WEIGHT: bold; WIDTH: 30px"><col style="WIDTH: 64px"><col style="WIDTH: 7px"><col style="WIDTH: 7px"><col style="WIDTH: 7px"><col style="WIDTH: 7px"><col style="WIDTH: 64px"></colgroup><tbody>
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]2[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] "]=F3[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]3[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] "]=F4[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]4[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] "]=F5[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]5[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] "] [/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]6[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] "] [/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]7[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] "] [/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]8[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] "] [/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]9[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] "] [/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]10[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] "] [/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]11[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] "]=F12[/TD]

</tbody>
 
Upvote 0
How about
=INDIRECT("F"&RIGHT($B$2)+ROW(A1))
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,147
Members
453,021
Latest member
Justyna P

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