Excel concatenate fill down won't advance by 6 the way I need it to - excel

I have an excel worksheet that has formulas and references other tabs in the workbook.
I'm pulling a street number and street name and putting it in another tab.
Here are 2 lines of formula:
=CONCATENATE('Building Limits'!C669," - ",'Building Limits'!C672," ",'Building Limits'!D672)
=CONCATENATE('Building Limits'!C675," - ",'Building Limits'!C678," ",'Building Limits'!D678)
I have tried to fill down, copy & paste special and this is what I get:
=CONCATENATE('Building Limits'!C676," - ",'Building Limits'!C679," ",'Building Limits'!D679)
I need the line below to advance to C681 and C684.
I know I can copy down and adjust each line, but I do not have to the time to do it all manually. I have to add 140 more lines to get my sheet to correctly reference the addresses that I've already entered.
I didn't create the workbook, so it's more than a little challenging.
Can anybody offer up a suggestion?

Use INDEX():
=CONCATENATE(INDEX('Building Limits'!C:C,(ROW(1:1)-1)*6 + 669)," - ",INDEX('Building Limits'!C:C,(ROW(1:1)-1)*6 + 672)," ",INDEX('Building Limits'!D:D,(ROW(1:1)-1)*6 + 672))
6 is the spacing and the + 669 and + 672 are the starting rows.

Related

Excel (2016) recursive concatenation and hyperlinks

I have a Excel sheet that calculates distance, speed and bearing of a boat given a waypoint in degree, minutes and seconds (I use it to follow races and friends). The sheet supports up to 5000 points. I want to add a column with a hyperlink to www.windy.com to plot the points in windy website.
I already have a concatenated formula that create the hyperlink but I add every value by myself.
1st. =HIPERVINCULO(CONCATENAR("https://www.windy.com/distance/";U5;",";V5;";";U6;",";V6);"Windy")
2nd. =HIPERVINCULO(CONCATENAR("https://www.windy.com/distance/";U5;",";V5;";";U6;",";V6;";";U7;",";V7);"Windy")
3rd. =HIPERVINCULO(CONCATENAR("https://www.windy.com/distance/";U5;",";V5;";";U6;",";V6;";";U7;",";V7;";";U8;",";V8);"Windy")
4rd. =HIPERVINCULO(CONCATENAR("https://www.windy.com/distance/";U5;",";V5;";";U6;",";V6;";";U7;",";V7;";";U8;",";V8;";";U9;",";V9);"Windy") and so on
The link uses values in columns V and W because windy needs the values with decimal point instead decimal comma.
Here is the table
enter image description here
The problem that i'm facing is how to automaticaly/recursive add the points that are inserted. Now I add to the Concatenate/hyperlink formula the new point. But I would like to have a routine/algorithm to automatically do the concatenate in every row until the last one (row 5004).
Thanks a lot.
PS. If someone thinks that would like to have the excel sheet or find it usefull I can send a copy.
05.07.21 10:13
Hi all, thanks Ron Rosenfeld and EEM for your answers. EEM the formula you gave me worked perfectly. Thanks a looot. I only had to do minor change. But now I'm facing a different problem. Sorry.
Problem now is the 255 chars hyperlink limit. After 15 iterations the formula doesn't work anymore and I only get #¡VALOR! #VALUE!.
I have been trying before asking again, but without luck. Seems to be a way to solve this "behaviour" with VBA but I can't figure out.
As Mr. Rosenfeld required more information, here are the formulas used.
Table: image with data
As you can see in column W there is a link with the growing formula I started with.
The formula provided by EEM is in column AA.
DECIMAL LATITUDE
ROWS L5:L5004 =IF(D5="","",IF(G5="S",(-1*(D5+E5/60+F5/3600)),(D5+E5/60+F5/3600)))
DECIMAL LONGITUDE
ROWS M5:M5004 =IF(H5="","",IF(K5="W",(-1*(H5+I5/60+J5/3600)),(H5+I5/60+J5/3600)))
www.windy.com uses . as decimal separator instead ,
CHANGE Excel , to windy .
ROWS U5:U5004 =SUBSTITUTE(LEFT(L5,6),",",".")
ROWS V5:V5004 =SUBSTITUTE(LEFT(M5,7),",",".")
Formulas to create the hyperlink (A million thanks to EEM)
ROW AA5 = HYPERLINK(CONCATENATE( "https://www.windy.com/distance/", $X5, ",", $Y5 ),CONCATENATE( $X5, ",", $Y5 ) )
ROW AA6:AA5004 = IF(U6=0,"",HYPERLINK(CONCATENATE( "https://www.windy.com/distance/", AA5, ";", $X6, ",", $Y6 ), CONCATENATE( AA5, ";", $X6, ",", $Y6 ) ))
As said, after 14 iterations the hyperlink grows more than 255 characters.
www.windy.com format to create a route latitude, longitude;
https://www.windy.com/distance/20.31,-60.52;22.05,-61.36;23.03,-61.73;25.20,-61.10;26.17,-62.82;27.06,-62.62?22.973,-61.669,7
Formulas used to calculate distance and bearing (just in case someone needs them)
DISTANCE
=IF(L6="","",(6371*ACOS(COS(RADIANS(90-L5))*COS(RADIANS(90-L6))+SIN(RADIANS(90-L5))*SIN(RADIANS(90-L6))*COS(RADIANS(M5-M6))))*0.539956)
BEARING
=IF(P6=0,"",IF(L6="","",DEGREES(MOD(ATAN2((COS(RADIANS(L5))*SIN(RADIANS(L6)))-(SIN(RADIANS(L5))*COS(RADIANS(L6))*COS(RADIANS(M6-M5))), SIN(RADIANS(M6-M5))COS(RADIANS(L6))),2PI()))))
Thanks everybody for your time and knowledge.
13.07.21. NO LUCK. I have been incapable of doing it. But I opened the file in OPEN OFFICE and with a little bit of formatting it's working flawlessly.
It's annoying the 255 chars limit in Excel, but I'm not going to break my head any more.
Thanks a lot EEm.
The formula proposed uses the friendly_name parameter of the HYPERLINK function to hold the accumulated concatenation of latitud and longitud of each row in order to be passed to the next row formula.
To Show the word Windy in the cell format the cells with this Number Format: ;;;"Wendy"
Enter this formula in [Y5]:
= HIPERVINCULO(
CONCATENAR( "https://www.windy.com/distance/"; $U5; ","; $V5 );
CONCATENAR( $U5; ","; $V5 ) )
Enter this formula in [Y6]:
= HIPERVINCULO(
CONCATENAR( "https://www.windy.com/distance/"; Y5; ","; $U6; ","; $V6 );
CONCATENAR( Y5; ","; $U6; ","; $V6 ) )
Copy formula in [Y6] to [Y7:Y5004]
Format range [Y5:Y5004] with NumberFormat: ;;;"Wendy"

Copying a number from one workbook to another and then coverting that number to a % format is adding two extra places

For example, I copy these 4 items from workbook 1 to workbook 2.
73.05
73.78
70.66
66.75
and then after pasting them and changing the formatting to percent, it turns into:
7305%
7378%
7066%
6675%
That's not what I want. I want :
73.05%
73.78%
70.66%
66.75%
Formatting as percent multiplicitets the value automatically by 100, because '%' means per hundred '/100', so if you want the values to look the same, you must divide them by 100.

Nesting error in Excel Formula - Changes to If

I'm currently trying to record a macro for my excel spreadsheet, but keep recieving the message "The specified formula cannot be entered because it uses more levels of nesting than are allowed in the current file format can anyone help me out in fixing the formula to make it smaller?
=IF(ISNUMBER(SEARCH("Conductor + Surface",B3)),"Conductor + Surface",IF(OR(ISNUMBER(SEARCH("17
1/2",B3)),ISNUMBER(SEARCH("Drilling",B3)),ISNUMBER(SEARCH("12 1/4",B3)),ISNUMBER(SEARCH("8
1/2",B3)),ISNUMBER(SEARCH("Run Screens",B3)),ISNUMBER(SEARCH("Temporay",B3)),ISNUMBER(SEARCH("BOP
Hop",B3)),(ISNUMBER(SEARCH("Data Acquisition",B3)))),"Inter, Res, Lower Comp., &
TP&A",IF(ISNUMBER(SEARCH("Maintenance",B3)),"BOP Maintenance",IF(OR(ISNUMBER(SEARCH("Re-
entry",B3)),ISNUMBER(SEARCH("Wellbore Prep",B3)),ISNUMBER(SEARCH("Run
Completion",B3)),ISNUMBER(SEARCH("Install TH",B3)),ISNUMBER(SEARCH("BOP
Pull",B3)),ISNUMBER(SEARCH("Subsea Move Off",B3)),ISNUMBER(SEARCH("BOP Run -
Completion",B3))),"Upper Comp & TH",IF(ISNUMBER(SEARCH("Rig Move - N and C",B3)),"Rig Move - N and
C",IF(ISNUMBER(SEARCH("Install XMT",B3)),"Install XMT w/ Rig",IF(ISNUMBER(SEARCH("Open
Plugs",B3)),"Open Plugs",IF(ISNUMBER(SEARCH("Rig Move - S and B",B3)),"Rig Move - S and
B",IF(ISNUMBER(SEARCH("Install VXT",B3)),"Install VXT","ERROR IN EXCEL FORMULA")))))))))
Currently there is a column with tasks that are too in depth, aka "New Conductor + Surface" or "ADCO - DG2 8 1/2" I want to make a new column with shorter names for each of them depending on certain words that are in the detailed column. I would then like to return an error if there is a detailed task that is not described properly.
This can be done by modifying the setup in this link to a 2 column lookup table.
See below for sample:
Array formula is =IFERROR(INDEX(lookupList,MATCH(TRUE,ISNUMBER(SEARCH(list,D7)),0),2),"NOT FOUND")
remember to press Ctrl+Shift+Enter when exiting cell edit mode.

writing a macro to transpose 3 columns into 1 row

I have data as below which is 3 columns I need to transpose into 1 row. The row position needs to be changeable as I move down the specimens. I'm not at all familiar with Excel (am using 2013). Any help would be wonderful. I need to do this hundreds of times and cut and paste then transpose takes too long. Any ideas?
-5.13E+01 -1.99E+02 -1.53E+00
-5.86E+01 -2.12E+02 2.05E+00
-6.61E+01 -2.21E+02 7.45E+00
-6.67E+01 -2.34E+02 1.29E+01
-6.38E+01 -2.46E+02 1.57E+01
-3.90E+01 -2.56E+02 2.54E+01
-1.51E+01 -2.44E+02 2.33E+01
-1.02E+00 -2.31E+02 1.23E+01
-8.72E-01 -2.21E+02 4.19E+00
-1.39E+00 -2.10E+02 1.42E+00
-5.88E+00 -2.00E+02 -1.41E+00
-1.08E+01 -1.89E+02 -1.52E+00
6.15E+00 -2.27E+02 -2.09E+01
-3.11E+00 -2.25E+02 -1.97E+01
-1.96E+01 -2.29E+02 -1.00E+01
-2.52E+01 -2.32E+02 -4.73E+00
-4.17E+01 -2.35E+02 2.48E+00
-4.44E+01 -2.46E+02 6.48E+00
-4.22E+01 -2.60E+02 1.02E+01
-5.32E+01 -2.30E+02 2.18E+00
Cheers
I think this works, but I'd recommend checking!:
=IF(COLUMN()<24,INDEX($A$2:$C$21,COLUMN()-3,1),IF(COLUMN()<44,INDEX($A$2:$C$21,COLUMN()-23,2),INDEX($A$2:$C$21,COLUMN()-43,3)))
in D1 and copied across, assuming -5.13E+01 is in A2 and so forth.
(Even if it does, it probably is far from ideal though, just the best offer you've had so far.)

Increment Rows in Excel by one (1) up to line 100, repeat until reach row 25000

I have a spreadsheet where I increment the value/string in a cell by one up to row 25000
="User_"&ROW(A1) or =CONCATENATE("User_",ROW(A1),"#mail.com")
This works fine.
Now, my question is how do I put a conditional in where I want to increase the value for each row by one up to 100 but then want to start at one again?
User_1
User_2
User_3
'
'
User_100
User_1
User_2
'
'
User_200
User_1
'
'
User_25000
Instead of ROW(A1) (or simply ROW()), use IF(MOD(ROW(),100)=0,ROW,MOD(ROW,100))
=IF( MOD(ROW()-1,100)=0,ROW()-1,MOD(ROW()-1,100) )
If you have headers.
And with the email info it should be like:
="User_" & IF(MOD(ROW()-1,100)=0,ROW()-1,MOD(ROW()-1,100)) & "#mail.com"
="User_"&MOD(ROW()-2,100)+1&"#mail.com"
The -2is because you said it starts on row 2, so if it starts in another row, replace the 2 with that number.
Replace the 100with whatever number you want it to go up to before repeating.
The +1is to eliminate the IFlogic needed by the other answers to this question.
Sorry this is well after the fact of the question, but hopefully it'll help someone else!
**bonus tip - if you want it to be "User_001#mail.com" (pad out the number to 3 digits), use the TEXT function like this: ="User_"&TEXT(MOD(ROW()-2,100)+1,"000")&"#mail.com"

Resources