moving row/cell values to another sheet if row is true

Sweedler

Board Regular
Joined
Nov 13, 2020
Messages
114
Office Version
  1. 2016
Platform
  1. Windows
  2. MacOS
moving row/cell values to another sheet if row is true

1607962743530.png

1607962834648.png


Ok,

So here is tough one .. maybe.

From my first sheet I have a product list with a checkbox next to each one . The checkbox is linked to the cell that it is in and then that cell font is white to make the TRUE/FALSE value invisible. What I want to do is that based on the TRUE/FALSE value of the check box I want the value in column C to be moved into column A in the other sheet. I would prefer for the value to disapear as well if the value is altered to FALSE.

IDEAS?
 
Last edited by a moderator:
@Sweedler, assign a code to the button and run.
VBA Code:
Sub Moving_True()
    Dim a(), rws
    Dim rng As Range
    Dim lr As Integer
    
    With Sheets("artikellista")
        lr = .Cells(Rows.Count, "C").End(xlUp).Row
        Set rng = .Range("B6:C" & lr)
        a = rng.Value
    End With
    With rng
        rws = Filter(.Parent.Evaluate("transpose(if((" & .Columns(1).Address & "=" & True & "),row(1:" & .Rows.Count & ")))"), False, 0)
    End With
    If UBound(rws) > -1 Then
        With Sheets("beställningsunderlag")
            .Range("A" & .Cells(Rows.Count, "A").End(3).Row)(2).Resize(UBound(rws) + 1) = Application.Transpose(Application.Index(a, rws, 2))
        End With
    End If
    Set rng = Nothing
End Sub

 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,214,950
Messages
6,122,428
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top