Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default difficult concatenate macro

I wanna know if there's a way to do that

i have 20 cells in 2 rows

A B C D .... AA <-- columns
X X X ... <-- cells used as check box
Z Z Z ... Z <-- cells used as headers
1 3 4 5 ... N <-- cells with values

I want to run a macro to concatenate, each time i push a button, all
the cells in a range that they are checked

So if i check the cells A B & D i want
THIS to happen -- =concatenate("A3";"B3";"D3")

Thanks in advance
-----------------------------------------
Stathis
Patras , Greece


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default difficult concatenate macro

Hi
try the following macro (puts the return the value in A4)
sub foo()
dim rng as range
dim cell as range
dim ret_str
set rng = range ("A3:AA3")
for each cell in rng
if cell.offset(-2,0).value = "X" then
ret_str = ret_str & cell.value
end if
next
range("A4").value = ret_str
end sub

--
Regards
Frank Kabel
Frankfurt, Germany
"stakar " schrieb im
Newsbeitrag ...
I wanna know if there's a way to do that

i have 20 cells in 2 rows

A B C D .... AA <-- columns
X X X ... <-- cells used as check box
Z Z Z ... Z <-- cells used as headers
1 3 4 5 ... N <-- cells with values

I want to run a macro to concatenate, each time i push a button, all
the cells in a range that they are checked

So if i check the cells A B & D i want
THIS to happen -- =concatenate("A3";"B3";"D3")

Thanks in advance
-----------------------------------------
Stathis
Patras , Greece


---
Message posted from http://www.ExcelForum.com/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default difficult concatenate macro

Frank,
You are a specialist !!

Thanks a lot !!



**************
Stathis
Patras - Greec

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Concatenate using Macro Gaura215 Excel Discussion (Misc queries) 0 February 9th 11 02:07 PM
Difficult Time/ Deleting Macro/ Tool Bar John New Users to Excel 2 December 6th 07 04:30 PM
Concatenate Macro osaka78 Excel Discussion (Misc queries) 6 April 9th 06 01:34 PM
Macro Help: Concatenate Populated Cells in Column A TJM Excel Discussion (Misc queries) 3 June 11th 05 11:25 AM
Running a macro to concatenate pcor[_2_] Excel Programming 1 July 23rd 03 10:09 PM


All times are GMT +1. The time now is 05:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"