If statement + & operator +Count/Character formula help

igmike

Board Regular
Joined
Feb 12, 2013
Messages
62
Office Version
  1. 2013
Platform
  1. Windows
Hi,

I am looking for a formula to combine text, one cell would add text DLC if present, no text if Game is present (B2). Max Count 80 characters, by picking the different choices of text (C2) that would not trim E2. It is beyond my skill set, I only know how to use necessary formulas individually.

A2= Text B2=Game or DLC C2=text with different # of characters D2=Text

C2= Region Free PC Key or Region Free Global PC Key
E2=A3&C3&" "&D3

Thanks in advance.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi @igmike
Im sorry, but I don't understand your examples.
Could you put more examples of what you have in the cells and the result you want.

To do this, use the XL2BB tool. For example:
varios 27may2023.xlsm
ABCDE
1Expected result
2Example1Ex1 col BEx1 col CEx1 col D?
3Example2Ex2 col BEx2 col CEx2 col D?
4Example3Ex3 col BEx3 col CEx3 col D?
5Example4Ex4 col BEx4 col CEx4 col D?
Examples



Note XL2BB:
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in
Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
;)
 
Upvote 0
An example of your data and scenarios would have been very helpful.
Here is a solution based on my interpretation of your question:

Book1
ABCDE
1
2Textif "Game", "","DLC"text w different nbr of charssome more textText DLC text w different nbr of chars some more text
3=A2"DLC" or ""=C2=D2=A2 DLC =C2 =D2
4BlahDLCBlah BlahBlahBlah DLC Blah Blah Blah
igmike
Cell Formulas
RangeFormula
E2:E4E2=A2 &" "& IF(B2="Game","","DLC") &" "& C2 &" "& D2


Note: You need to give the priority of which cells must be reduced if the total length is greater than 80.
 
Upvote 0
@DanteAmor @awoohaw

Thanks for your input. Had trouble getting Excel to accept XLBB2.0, So I've added images. If any other info is need, please let me know. Thanks. A simpler version I used this formula =A2&IF(LEN(A2)<66," Fast Delivery","")

Priority 1. Game Name, DLC if present, + platform cannot be altered
. Based on # of Characters in D2,
IF D2=<23>50,(Region Free GLOBAL PC Key) IF D2=<51>78 (Region Free PC)

Order of Cells for Title: A2 + DLC or " " + E2 + F2.

A= Game Name B=DLC or " "
A2:5 B2:4 = " "
Grand Theft Auto V: Premium Online Edition
Red Dead Redemption 2 Standard Edition
Human: Fall Flat
FIFA 20: 2200 FUT Points B5= DLC

C= Game + Platform D=Len function
C2:C4 =A2&B2&F2, C5=A5&B5&" "&F5
Grand Theft Auto V: Premium Online Edition Rockstar 52
Red Dead Redemption 2 Standard Edition Rockstar 48
Human: Fall Flat Steam 23
FIFA 20: 2200 FUT Points DLC Origin 36
 

Attachments

  • game-title.JPG
    game-title.JPG
    54.1 KB · Views: 8
  • game-title2.JPG
    game-title2.JPG
    72.4 KB · Views: 8
Last edited:
Upvote 0
try to get xl2bb to work. If it it isn't a work computer that has restrictions it will work. Mr. excel even has a testing area to test (link also below)

We cannot copy and paste data from images.
In the worst case, paste your data as a table.
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,316
Members
452,634
Latest member
cpostell

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