Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
string within formula
Right now I'm setting the formula on range like this:
oSubTotalSheet.Range("A1:A" & lngLastRow).Formula = "=A1&B1&C1&D1" I need to insert a delimiter between each cell in the concatenation. Something like this: oSubTotalSheet.Range("A1:A" & lngLastRow).Formula = "=A1&'|'&B1&'|'&C1&'|'&D1" Is there a way I can do this with a one-liner? I suppose I could just loop though each row and put the actual value in, but I hoped I go get this to work. Thanks, Woody |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
string within formula
Hi, oSubTotalSheet.Range("A1:A" & lngLastRow).Formula = "=A1 & ""|"" & B1 & ""|"" & C1& ""|"" & D1" Your current formula will give a circular reference. HTH "sugargenius" wrote: Right now I'm setting the formula on range like this: oSubTotalSheet.Range("A1:A" & lngLastRow).Formula = "=A1&B1&C1&D1" I need to insert a delimiter between each cell in the concatenation. Something like this: oSubTotalSheet.Range("A1:A" & lngLastRow).Formula = "=A1&'|'&B1&'|'&C1&'|'&D1" Is there a way I can do this with a one-liner? I suppose I could just loop though each row and put the actual value in, but I hoped I go get this to work. Thanks, Woody |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF formula string | Excel Worksheet Functions | |||
Converting a Formula stored as String to real Formula | Excel Worksheet Functions | |||
Formula to Replace or eliminate any sheetname(s) in formula string | Excel Discussion (Misc queries) | |||
Use a string in a formula | Excel Programming | |||
Create a formula into a String then assign string to a cell | Excel Programming |