View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gryndar Gryndar is offline
external usenet poster
 
Posts: 12
Default 'IF' Macro to insert cell contents to alternate cell if cell n

Maybe it would be easier to put buttons in same cell as info and just widen
cell to fit buttons. Then I just need a macro to do same as below but from
"Same Cell" instead of "Adjacent Cell".

"Gryndar" wrote:

That works great but after looking at my sheet I have a different problem
now, too many macros. I have 16 buttons per row (numbered 1 thru 16) and 32
rows (512 macros). It is a draw your partner tournament sign-up sheet for my
local foosball tournament. Is it possible to have a macro that copies the
contents of the cell, 'adjacent' to the left of the button selected, to the
target cell or alternate cell if target cell is not blank, and to assign the
same macro to same number button on each row? *(From adjacent cell "A2" [in
this case selecting button 1] to E2 or E3 and next row would be, (button 1
selected), from A3 to E2 or E3 etc... [button 2 would go to E4 or E5 etc...).
Hopefully this would give me 16 macros with 32 (number "1") buttons assigned
to each macro.

"Luke M" wrote:

Merry Christmas to you too!

Sub CheckCell()
If Range("A2").Value = "" Then
Range("A2").Value = Range("C2").Value
Else
Range("A3").Value = Range("C2").Value
End If

End Sub
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Gryndar" wrote:

I would like to create a macro that sends the contents of a cell to another
cell when a particular button is sellected but if that cell already has
content to then send the info to an alternate cell. *(Click on button 1 to
send contents of C2 to cell A2 but if A2 is not empty to send contents to A3)

I have used ya'll (yes I am southern) several times before for macro info
and have received great responses. Thanks a bunch in advance. MERRY
CHRISTMAS EVERYONE!