Get value based total column in range minus Blank columns

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
2,681
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hi.
I have data in range from Columns G to R. I have value "a" at column J and then 2 Empty Columns. After them I have data at column M and formula give me value "d" but I want to be "b". Also for Column Q, I have "h" but I want "c". If I have Data, this is my formula at Column M( change Column part [ COLUMNS($J:M) ] based column from Column K to R) :
VBA Code:
MID("abcdefghijklmnopqrstuvwxyz",COLUMNS($J:M),1),""))

I want to change Column part to take exact value (respectively a,b,c,d,e,...).
thanks
MIDD.jpg
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Can you share how it determines if a letter should be there?
 
Upvote 0
I would like to see the full formula that you have just shown part of. (That may also help answer C Moore's question)

It would also help if you did two further things:
  1. Update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

  2. Provided your sample data with XL2BB to make it easier for helpers by not having to manually type out sample data to test with or risk typing data incorrectly.
 
Upvote 0
This is my Total formula at Excel Ranges. Formula for column J different from others (K to U).
Thanks.
Cell Formulas
RangeFormula
J1:U1J1=TRANSPOSE(I3:I14)
J3:J14J3=IF(AND(OR(J$1-$I3>0,J$1-$I3=0),J$1-$I3<1.6),MID("abcdefghijklmnopqrstuvwxyz",COLUMNS($J:J),1),"")
K3:U14K3=IF(AND(K$1-$I3<1.6,J$1-$I3<1.6),"",IF(AND(OR(K$1-$I3>0,K$1-$I3=0),K$1-$I3<1.6),MID("abcdefghijklmnopqrstuvwxyz",COLUMNS($J:K),1),""))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thanks for the profile update and XL2BB sample. (y)

See how these would go for you. J3 copied down and K3 copied across and down.

20 07 29.xlsm
GHIJKLMNOPQRSTU
156.55655.75515150.255046.2543.7543.542.542.25
2RankGenotypesWeight
31BS1556.5a           
42BS1856a           
53BS1055.75a           
64BS1651   b        
75BS2051   b        
86BS950.25   b        
97BS1750   b        
108BS1446.25       c    
119BS443.75        d   
1210BS743.5        d   
1311BS1142.5        d   
1412BS1942.25        d   
maabadi
Cell Formulas
RangeFormula
J3:J14J3=IF(AND(OR(J$1-$I3>0,J$1-$I3=0),J$1-$I3<1.6),"a","")
K3:U14K3=IF(AND(K$1-$I3<1.6,J$1-$I3<1.6),"",IF(AND(OR(K$1-$I3>0,K$1-$I3=0),K$1-$I3<1.6),CHAR(MAX(IFERROR(AGGREGATE(14,6,CODE($J$3:J$14),1),96),96)+1),""))
 
Upvote 0
Solution
Yes. Peter_SSs
I work it and finally find one solution.
I add this formula down of table at J16 and across right.
Code:
=LOOKUP(2,1/(J$3:J$14<>""),ROW(J$3:J$14))
Then put J17=1 and add this formula after it at K17 and again across right.
Code:
IF(J16=K16,J17,J17+1)
and finally add one table after first table at Columns X to right and add this formula to it.
Code:
X3=J3   and  across down
Y3=IF(K3="","",IF(LOOKUP(2,1/(J$3:J$14<>""),ROW(J$3:J$14))=LOOKUP(2,1/(K$3:K$14<>""),ROW(K$3:K$14)),"",MID("abcdefghijklmnopqrstuvwxyz",K$17,1)))
and Across it down and right.
And Problem Solved.

Thanks again.
 
Upvote 0
Thanks again for your solution Peter_SSs.
I don't understand your solution at previous post.
It worked me.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,157
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