Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
it looks really easy but I am thinking since more than 24 hours.
I need to merge two values of two different cells with a space, it looks easy =B23&" "&B24 but in reality every report is different and I am trying to register a macro. so if I write B23, B24 as in the example the next sheet could have the the two values everywhere. So registering the marco use CTRL F to find the value I need then register then i press CTRL arrow right to read the value on the cell on the right, it works as a charm with one value because the macro find the string i need and then goes to the right to take the value I need but now I have to merge as in the example above( =B23&" "&B24) or worse (sheet1!B23& etc) if refers to another sheet. I am trying to find a formula to combine offset search find index, I tried to built a VBA function, but does not work when I have a formula excel recognize a specific cell not the one to the right of the string I look with ctrl f |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
Once your macro identifies the first cell (as you say that it can), this line will merge the contents of that cell with the cell one column to the right of it: MsgBox ActiveCell.Value & " " & ActiveCell.Offset(0, 1).Value Just change the "MsgBox" part to whatever you need (i.e. a Range value, a variable, etc.) Ben |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cool thank you
On 24 okt, 14:11, Ben McClave wrote: Hello, Once your macro identifies the first cell (as you say that it can), this line will merge the contents of that cell with the cell one column to the right of it: MsgBox ActiveCell.Value & " " & ActiveCell.Offset(0, 1).Value Just change the "MsgBox" part to whatever you need (i.e. a Range value, a variable, etc.) Ben |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a difference between CTRL+D and CTRL+" (quotation marks) | Excel Discussion (Misc queries) | |||
Excel 2007: Ctrl+PgUp or Ctrl+PgDn with Protected Sheets | Excel Discussion (Misc queries) | |||
use CTRL key inside a macro IE CTRL + ; | Excel Worksheet Functions | |||
Generate Reports from Excel Using Seagate Crystal Reports PLs... H | Excel Programming | |||
Cell doesn't show formula result - it shows formula (CTRL + ' doe. | Excel Worksheet Functions |