JohnnyTAK
(JohnnyTAK)
April 22, 2022, 3:55pm
1
Hi All,

I’m in need of some assistance. I seem to can’t subtract in excel using studiox. I’ve read many post and it seems every single one of them I have tried does not work. Help will be much appreciated.

Here is my current setup.

Here is my data set on excel.

I keep getting the #NAME error. What I’m trying to do is subtract AT - AU to get the sum in AV. Note, this is already under “For each excel row.”

Note, this is in an IF function and it works fine. It’s really the subtraction I’m stuck on.

Many thanks

JohnnyTAK
(JohnnyTAK)
April 22, 2022, 3:56pm
2

Since I’m a new user, they only allow me to upload one image at a time. Please find the excel screenshot attached.

Thanks again

DemoStudiox.zip (59.5 KB)
Hello @JohnnyTAK ,

Please find the attached Workflow build using Sudiox. It will help you to solve the Subtraction issue.

JohnnyTAK
(JohnnyTAK)
April 22, 2022, 8:02pm
4
Thanks for the feedback. Unfortunately, this did not work. Please see screenshot.

Hello,

Did you tried to execute the same workflow which I shared?? It executed in my machine… If it’s working you can use the same logic,

Hi, sorry for the delay in following up. I did try your workflow but it seems to not work. Please find the screenshot of what was applied.

Thanks for your continued help.

What’s d error that you are getting?? Can you run in debug mode and check where it’s failing

Here is the result. It’s not an error but it is replicating on what is on each cell but I need it to do the actual formula.

Sorry, I’m not sure how to do this in the debug mode.

Thanks

What is the type of the these numbers is it a number or text?? Can you check once manually are you able to subtract 2 cells??

Hi Rahul,

They’re “numbers”. They’re not text or “general”. I believe that’s what you were asking. If I was to do this manually in excel, it would work. Unfortunately, I am looking for StudioX to perform this automation.

Thank you,
Johnny

I asked just to verify. Are you converting something while substracting??

Because in the flow which I shared also, I used studios and I worked fine… Can you print the result in a message box before writing to cell.

No worries. The results are the previous screenshot shared but here is the excel version with the formula included.

This is under an “if” function under “for each excel row”.

It is properly writing the formula as seen above. Although, I need it to calculate rather than write out/read out the calculation.

Can u share the excel which you are using?

Spendbook for Rahul.xlsx (10.2 KB)

I can’t share the actual workbook due to confidential information. Although, I did copy a portion of the workbook and uploaded in a new file.

Please note, line 2-8 was using your formula above. Line 9-10 was using the formula (=AT-AU). For Line 11-16, i used =SUM(AT2)-AU2 but this is limited to only cell 2 (even with for each excel row).

I hope this helps.

Thanks again,
Johnny

ushu
(Usha kiranmai)
May 2, 2022, 6:59pm
16
@JohnnyTAK Try this expression

```
CDbl(CurrentRow("AT").ToString)-CDbl(CurrentRow("AU").ToString)
```

Hi Ushu,

I removed my expression and entered yours into the “text” area.

This is now what I’m viewing as a result.

Sorry, I’m definitely stumped here.

Thank you,
Johnny

ushu
(Usha kiranmai)
May 3, 2022, 7:32am
18
@JohnnyTAK Can your workflow please and also excel with sample data

Hi Ushu,

For workflow, it’s on a “for each excel row”. Within it, I’m doing quite a bit of VLOOKUP and other “if” functions. They’re all automating correctly. It’s only the subtraction that’s not occurring.

For results, I refer you to the "spendbook for rahul.xlsx. attached from a previous post. There are context to that post as well.

Please let me know if you can assist.

Thanks,
Johnny

@ushu , still no luck on my end. Any other suggestions.

Thanks!