ws.cellsnr

  1. N

    Translate Excel Function to VBA

    Hi, Can someone please help me translate this function to VBA? =IF(G5="Delivery",(10000+IF(D5="Ain Jarfa",1000,3000)),10000) I need it in Sub cmdNew_Click as: ws.Cells(nr, "I").formula = (The above function) Note: Instead of "G5" put (ws.Cells(nr, "G")) Instead of "D5" put (ws.Cells(nr...
  2. N

    Check Value if exist in a range and then....

    Hello, I have the following code to add the input BarCode and it's related details to the next available raw in sheet2 column ("P") Here is a piece of my code that works fine: [CODE]Dim ws As WorksheetSet ws = Sheet2 nr = ws.Cells(Rows.Count, "P").End(xlUp).Row + 1 ws.Cells(nr, "P") =...
  3. N

    Search manually from sub_Change

    Hello, I have a userform with a lot of textboxes, one of these textboxes is "txtBarCode" that allows me to enter any Barcode to check if the item is exist or not and lookup values for "txtItemName" & "txtPrice" and I have the code below that works very well But, sometimes I need to enter the...
  4. N

    VBA Insert a formula in a cell

    Hello, I have a userform to add items to sheet1 and I'm using the code below, and inserting manually formulas to columns ("C" "E" "F" "G") Private Sub cmdAdd_Click()Dim ws As Worksheet Dim MsgBoxResult As Long Set ws = Sheet1 nr = ws.Cells(Rows.Count, 1).End(xlUp).Row + 1 ws.Cells(nr, 1) =...
  5. N

    User Form data entry as date and number!!!

    Hello, I have the code below for a user form to enter some data on my sheet "Expenses" TextBox1 including date as shown on the second code Once I enter the data to the sheet, it shows the date as text TextBox4 including the amount Once I enter the data to the sheet, it shows the number as...

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